I have a situation where I have a json String that has a child as an array containing only strings. Is there a way to get a reference to an object of arrays containing a specific string. Example:
{ "Books":{
"History":[
{
"badge":"y",
"Tags":[
"Indian","Culture"
],
"ISBN":"xxxxxxx",
"id":1,
"name":"Cultures in India"
},
{
"badge":"y",
"Tags":[
"Pre-historic","Creatures"
],
"ISBN":"xxxxxxx",
"id":1,
"name":"Pre-historic Ages"
}
]
}
}
Reach: From the above JSON line, you need to get all the books in History that contain "Indian" in the "tags" list.
I use JSONPATH in my project, but if there is another API that can provide similar functionality, any help is appreciated.
source
share