I wanted to test a json file locally with command (in bash)curl "https://jsonplaceholder.typicode.com/users" | jq
by following this tutorial video: https://www.youtube.com/watch?v=rrjIVepRqPI
I followed each step and added the executable file in the env variable path, but not working at all, I got result:
$ curl "https://jsonplaceholder.typicode.com/users" | jq
bash: jq: command not found
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 4670 0 4670 0 0 8584 0 --:--:-- --:--:-- --:--:-- 8584
curl: (23) Failed writing body (795 != 1369)
Am I missing anything? Why I still got error bash: jq: command not found
??
jq is written in C and has no runtime dependencies, so it should be possible to build it for nearly any platform. Prebuilt binaries are available for Linux, OS X and Windows.
jq command is used not only for reading JSON data but also to display data by removing the particular key. The following command will print all key values of Students. json file by excluding batch key. map and del function are used in jq command to do the task.
You can run a jq.exe
from git bash.
You only need to install it in your git bash PATH:
curl -L -o /usr/bin/jq.exe https://github.com/stedolan/jq/releases/latest/download/jq-win64.exe
Then jq will work with your pipe command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With