I have one strange requirement to fetch the values from JSON object by values, for example in the below json object, two arrays are there in that if I pass value as Steve instead of full value like Steve Jon, How do I loop my whole json object and find the matching object in the entire json object. My json object is very big and please suggest me any good way to loop entire object without killing performance. I have checked JSONPath expression but its not working
Thanks in advance
grouped_people: {
'friends': [
{name: 'Steve Jon', country: 'NZ'},
{name: 'Jane Ken', country: 'US'},
{name: 'Mike Jhon', country: 'AU'},
{name: 'Mary Mani', country: 'NZ'},
],
'enemies': [
{name: 'Evil Steve', country: 'AU'},
{name: 'Betty', country: 'NZ'},
]
}