JSON is used to exchange data in a structure form of strings between machines, it follows JavaScript syntax of objects and arrays. When you receive a JSON input, always parse it into a JavaScript object or array of objects before further processing, e.g.
<script>
jsonString = '[{"Processid":"4","ProcessName":"Fax Queue","Total":"31"}, {"Processid":"5","ProcessName":"Phone Queue","Total":"32"}]';
var jsonArray = JSON.parse(jsonString);
for (i=0;i<jsonArray.length;i++) {
alert(jsonArray[i].Processid + ", " + jsonArray[i].ProcessName + ", " + jsonArray[i].Total);
}
</script>
See demo at
Edit fiddle - JSFiddle[
^]
On the other hand, to output JSON data to another machine, always stringify it to string first, see
How to write JSON data in ajax[
^]