JSON Path 2 - criteria json path query not working

Labs - JSON PATH - Introduction - KodeKloud

Expected output:
[
“KCMDD3435K”
]

Why does this json path query not work?
alpine-host ~ ➜ cat q7.json | jpath $.car.wheels[?(@.location == “rear-right”)].model
[]

alpine-host ~ ➜ cat q7.json
{
“car”: {
“color”: “blue”,
“price”: “$20,000”,
“wheels”: [
{
“model”: “KDJ39848T”,
“location”: “front-right”
},
{
“model”: “MDJ39485DK”,
“location”: “front-left”
},
{
“model”: “KCMDD3435K”,
“location”: “rear-right”
},
{
“model”: “JJDH3434KK”,
“location”: “rear-left”
}
]
}
}

The query is correct but because you have special characters in your query you need to surround it with quotes:

cat q7.json | jpath "$.car.wheels[?(@.location == 'rear-right')].model"

it works, thanks [al1] for the working solution and explanation :grinning: