I have the following code:
j = 1;
while (j < 50) {
  //requirement:
     console.log(JSONitem [j]["criteria"]);
     reqtest = Object.keys(JSONitem [j]["criteria"]);
         ....
     j++;
}
But when I execute this, I get the following error:
TypeError: JSONitem[j] is undefined
The output object from the console.log part is right, but also in this line is the TypeErro above. I think, the "j" does not replace the number, but in the output console it works...
Thanks!
 
    