I’m attempting to loop through the rows in a model I have in javascript. Here is the code I’m running:
var params = arguments[0], $ = skuid.$;
console.log(‘Oh Yeah!!!’);
var modelStuff = skuid.model.getModel(‘modelName’);
console.log(modelStuff);
$.each(modelStuff.data,function(i,row) {
console.log(‘Oh No!!!’);
});
console.log(modelStuff);
Both of my console.log(modelStuff) calls before and after the loop show that the model has two rows with data, but I never get ‘Oh No!!!’
This is basically copy pasta straight from an example found in another question here. How can I show data (2 rows to be exact) in both of my console.logs but not ever execute the loop on modelStuff.data…
Question
javascript $.each loop not executing
This topic has been closed for replies.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.