There comes a time when you need to format some JSON in unix, in that case, use jq.
Install jq
sudo apt-get -y install jq
Using jq
So let's parse some JSON, let's use the nulled feed, first download the feed to a file
curl -s https://www.nulled.to/misc.php?action=getFeed >feed
Now let's parse some of it, let's try the home stuff
jq '.home' feed
so if we wanted to get the titles from the .home section of the feed
jq '.home[].title' feed
#!/bin/sh curl -s https://www.nulled.to/misc.php?action=getFeed >feed jq '.home[].title' feed rm feed
Edited by sunjester, 02 March 2019 - 10:01 AM.