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”
Thank you!
al1
February 8, 2024, 10:50pm
#2
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 .
I’ve finally jpath in the lab
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 ‘.’
"
al1
April 1, 2024, 2:17pm
#6
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’
al1
April 1, 2024, 5:32pm
#9
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.