Given the below Json input:
{
"category": "fiction",
"author": "Evelyn Waugh",
"title": "Sword of Honour",
"price": 12.99
}
I need to select the author field if the author matches the specified name, for example. Evelyn Waugh. I'm struggling to write a JsonPath expression for this. I tried the following without success. Can anyone suggest the correct expression?
$.author?(@ == 'Evelyn Waugh')
$.?(@.author == 'Evelyn Waugh')
$..?(@.author == 'Evelyn Waugh')
source
share