Reputation: 1
If I have a website that contains JSON with multiple "usrId":
, how can I count how many times this exists? I do not know if it's better to count JSON objects or just count how many times that word exists on the webpage, also I wouldn't know how to get started, how can I do this?
request(getusr, function(err, res, body) {
let json = JSON.parse(body);
let usramount = // count how many times usrId appears
})
Example json:
{
"id":"example",
"usrId":"example"
},
{
"id":"example"
"usrId":"example",
},
Upvotes: 0
Views: 209