Closed bkielbasa closed 2 years ago
Let's consider this example:
{ "name": {"first": "Tom", "last": "Anderson"}, "age":37, "children": ["Sara","Alex","Jack"], "fav.movie": "Deer Hunter", "friends": [ {"first": "Dale", "last": "Murphy", "age": 44, "nets": ["ig", "fb", "tw"]}, {"first": "Roger", "last": "Craig", "age": 68, "nets": ["fb", "tw"]}, {"first": "Jane", "last": "Murphy", "age": 47, "nets": ["ig", "tw"]} ] }
I want to check if there's an age with the value of 37. I've tried things like this but none worked.
age
age==37
age=37
age=="37"
@this.age=="37"
etc. How can I do it using jsons?
Queries are for arrays. But you can "wrap" the root document in an array and then do a query like:
[@this].#(age==37)
ok, it looks like it works! Thank
Let's consider this example:
I want to check if there's an
age
with the value of 37. I've tried things like this but none worked.age==37
age=37
age=="37"
@this.age=="37"
etc. How can I do it using jsons?