I have the following json:
{
"books": [
{
"id": 1,
"name": "República Brasileira. de Deodoro a Bolsonaro - 2° Edição",
"writers": [
{
"name": "Paulo Ghiraldelli Jr.",
"id": 1
},
{
"name": "Mariangela",
"id": 2
}
]
},
{
"id": 2,
"writers": [
{
"name": "Ilan Lapyda",
"id": 3
}
]
}
]
}
And I'm writing a JSONPath expression to find books that was written by "Mariangela". I have tried the following expression:
$.books[?(@.writers[*]['name']=='Mariangela')]
But I'm receiving "Invalid X-JSON-Path expression passed". What have I done wrong?