"Labs - JSON PATH - Introduction" issues

Hello,

I am trying to solve a couple of exercises with what is shown and taught in the previous video lesson “Introduction to JSON PATH”, but I cannot make it work.

The lessons shows this filter type

$.car.wheels[?(@.location == “rear-right”)].model

But it does not work in the lab. One example below:

What am I missing? Thanks

Hi,

If you need to use special characters in the JSONPath expression, make sure to enclose it in single quotes.

It should be: cat q10.json | jpath ‘$.employee.payslips[?(@.month == “august”)].amount’

Ok, thanks for the addition!