I have a situation where I have json String that has a child as Array that contains only Strings. Is there as way I can get the object reference of the arrays that contains
If you're using Goessner JSONPath, $.Books.History[?(@.Tags.indexOf('Indian') != -1)]
as mentioned by Duncan above should work.
If you're using the Jayway Java port (github.com/jayway/JsonPath), then
$.Books.History[?(@.Tags[?(@ == 'Indian')] != [])]
or more elegantly, use the in
operator like this $.Books.History[?('Indian' in @.Tags)]
. Tried them both here.