I have a JSON file having customer data as below . Here I want to extract the custName & CustId where amount is greater than 10 . But I'm stuck as unable to get the desired jsonpath for extracting these values .
"customers": [
{
"custId": 540,
"custName": "John",
"itemId": 647,
"itemAmount": 3000
},
{
"custId": 432,
"custName": "Adrian",
"itemId": 600,
"itemAmount": 2000
},
{
"custId": 541,
"custName": "Smith",
"itemId": 320,
"itemAmount": 1200
}
]
}
I tried something like - $.customers[*].itemAmount which gave me a list of itemAmount but my objective is entirely different so looking for the jsonPath expression to get the desired data.