-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
See comments starting with '==>':
In-document comparison
If a document contains an array, the '[' and ']' symbols can be used to define a comparison where statements are checked for truth on a per element basis which will then be combined. Consider:
[foo.bar1=1 and foo.bar2=2]
on:
[
{
"foo": [
{
"bar1":1
},
{
"bar2":2
}
],
},
{
"foo": [
{
"bar1":0
},
{
"bar2":0
}
]
}
]==> invalid JSON!
will return:
[
{
"foo": [
{
"bar1": 1
},
{
"bar2": 2
}
]
}
]==> query applied to corrected JSON (',' after "foo" elem in first obj deleted) returns nothing; but querying with
"foo.bar1=1 and foo.bar2=2"
works.
jgrep-1.3.1 (installed by gem), ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]
Metadata
Metadata
Assignees
Labels
No labels