Parse error with JSONPath expression

Hello everyone,
I am having trouble getting a value from JSON using JSONLibrary’s JSONPath expression.
I have tried the expression on four online JSONPath evaluators, where it worked fine.
My JSON is like this:

[
  {
      "item": "Book",
      "price": "15",
      "available": "True"
  },
  {
      "item": "Pencil",
      "price": "1",
      "available": "False"
  },   ... etc
]

I want to get, for example, price of Pencil. So the expression I use is:

$.[?(@.item == 'Pencil')].price

The error response returned by Robot JSONLibrary is:
Parse error at 1:3 near token ? (?)

Can you please help me figure out what mistake I made and how to solve it?
Thank you very much!

Best,
A

Edit.: Fixed formatting.

What’ the fix? Currently having the same issue

Referring to the documentation, do you have a space in the part after ?( ?

*** Known issue ***
If there is a space in JSONPath expression, the module used by this library will throw an exception. Therefore, please avoid the space in JSONPath expression if possible.

i.e.

should be

$.[?(@.item=='Pencil')].price

Dave.

@jsonchaos
Sorry for the late response. The project has been abandoned so I don’t have the code anymore.
But I remember the issue was not in spaces. Rather it needed another level of depth, so a missing dot. I didn’t quite understand why, it didn’t make sense to me. But that’s what fixed it.

Should Be
$[?(@.item==‘Pencil’)].price