Is it possible to find a property name that matches a regex pattern (or at least starts with) using JSON Path. In XPath I can use name() but I
name()
From my googling this is not possible in standard json path. However, the jsonpath-plus package extends the specification with @path; and makes the following possible
json path
@path
$..[?(@path.includes("[\'x-"))] $..*[?(@property === 'price' && @ !== 8.95)]
The above assumes you are using ES6.