Hey Gus, can someone help me regarding this ? http://stackoverflow.com/questions/40954727/check-if-any-value-in-jsonpath-is-repeated
What is use of this find DSL ? $.book[?(@.author==‘Nigel Rees’)].find(1)
I have a jsonPath as below
{ "book":
[
{ "category": "reference",
"author": "Nigel Rees",
"title": "Sayings of the Century",
"price": 8.95
},
{ "category": "fiction",
"author": "Nigel Rees",
"title": "Sword of Honour",
"price": 12.99
}
]}
And Want to check if any author name have got repeated? I tried
$.book[?(@.author=='Nigel Rees')].find(1)
But, it always throws an exception that found nothing, how could I check that the author='Nigel Rees'
occurrences i.e author='Nigel Rees'
have a two books?