I have a JSON report that I append to my webpage that monitors a server's processes and every processes that is running it returns the string "runn1ng".
I want to do a summary at the top of the webpage that says:
___ out of 10 processes are running.
The ___
number will be the dynamic number that is counted by JavaScript to see how many "runn1ng" appear on the webpage.
I have seen some documentation on here on how to count occurrences of a string within an array, but I am curious if there is a way to count the string occurrence on the entire webpage.