How to install de jpath utility?

hello everyone! hope you are all fine!

I’m going through JSON Path content. That is really useful content, amazing!

Then I decided to make use of it by installing jpath utility on my terminal.

It is being weird challenging, I was expecting to make a quick install with a pkg manager, but it is going around and can’t see it as in the labs.

Do you have any suggestion to make it with less “pain” :slightly_smiling_face:

Thank you!

JPath is in pip:
jpath · PyPI

I installed it using npm, i.e.,

npm install -g jpath

I think you can install python implementation using pip (pip install jpathpy) which will give you a CLI as well.

hello everyone! Good morning!

@al1 @rob_kodekloud , thanks to reply :+1: .

I’ve finally jpath in the lab :slight_smile:

Thank you All!

I am trying it on 22.04.4 LTS (Jammy Jellyfish) no success I am after installing and running it get below error.
"const StringType = typeDefs.String?.type
^

SyntaxError: Unexpected token ‘.’
"

What are you trying? Paste the command and output. I think Rob had the correct solution.

cat q9.json |jpath ‘$.prizes[?(@.year == 2014)].laureates[*].firstname’

I think this is because you are using an old version of node. Why can’t you use jq? It is available in most package managers.