For example, how can I extract all the people having age larger than minAge?
{
"minAge": 20,
"people": [
{
"age": 20,
"other": "foo",
"name": "Bob"
},
{
"age": 25,
"other": "bar",
"name": "Fred"
},
{
"age": 30,
"other": "baz",
"name": "George"
}
]
}
I'm imagining something like this:
people[?age > {minAge}], where {...} is an expression that is evaluated using the full JSON document as data, instead of the current node.
people[?age > @..minAge], where @.. refers to data one level above the current node. @... would refer to data two levels above the current node, etc.
people[?age > $.minAge], where $ refers to the root data, just like @ refers to the data of the current node.
Is something like this possible, or are there other ways to achieve this?
For example, how can I extract all the people having
agelarger thanminAge?{ "minAge": 20, "people": [ { "age": 20, "other": "foo", "name": "Bob" }, { "age": 25, "other": "bar", "name": "Fred" }, { "age": 30, "other": "baz", "name": "George" } ] }I'm imagining something like this:
people[?age > {minAge}], where{...}is an expression that is evaluated using the full JSON document as data, instead of the current node.people[?age > @..minAge], where@..refers to data one level above the current node.@...would refer to data two levels above the current node, etc.people[?age > $.minAge], where$refers to the root data, just like@refers to the data of the current node.Is something like this possible, or are there other ways to achieve this?