-
Notifications
You must be signed in to change notification settings - Fork 76
Closed
Labels
Description
I've tried a few things based on suggestions in this post but am having no luck. Obviously there are many different implementations of JSONPath so I'm wondering if this one has support for an OR operator.
As an illustration, the following example works with the online evaluator:
// JSON
{
"firstName": "John",
"phoneNumbers": [
{
"type" : "iPhone",
"number": "0123-4567-8888"
},
{
"type" : "home",
"number": "0123-4567-8910"
}
]
}// query
$.phoneNumbers[?(@.type == 'home' || @.type == 'iPhone')]
// desired output
[
{
"type": "iPhone",
"number": "0123-4567-8888"
},
{
"type": "home",
"number": "0123-4567-8910"
}
]Reactions are currently unavailable