-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
Hi guys!
I have json with following structure:
{
"territories":[
{
"type":"COUNTRY",
"name":"UNITED STATES",
"names":{
"de":[
{
"name":"VEREINIGTE STAATEN",
"official":"VEREINIGTE STAATEN VON AMERIKA",
"abbrv":"VS",
"unofficial":""
}
],
"en":[
{
"name":"UNITED STATES",
"official":"UNITED STATES OF AMERICA",
"abbrv":"USA",
"unofficial":""
}
]
}
}
]
}I want to filter all root objects by querying any of objects in names.de array. So i have next expression:
$.territories[?(@.names.de[0].official == 'VEREINIGTE STAATEN VON AMERIKA')]
The problem is in de[0] part because I should explicitly specify index of object to search.
I suggested that de[*] would solve this, but it's not working at all.
So, what are possible options to solve this issue?
Thanks.
Metadata
Metadata
Assignees
Labels
No labels