I have data pulled via curl which looks like this:
foo=[{"date":"2020-06-14","visitors":"323","pageviews":"392"},{"date":"2020-06-15","visitors":"152","pageviews":"172"}
What I want to do is add all of the visitor numbers and assign them to a variable, and add all of the pageviews and assign them to a variable.
I want to disregard the rest of the data.
I have no idea where to start with this.
awkjqwould be more suited as it is speciffically designed to handle jsoncurlyou could have a look at xidel. It can retrieve and parse the JSON data you're after.