In the success callback of an ajax request, I get one object, which is an array of objects (poList). I want to loop through this list and if the status property is something, then do something.
In the example below, response.PoList is a valid array object with two items in it and x is 0 (in the debugger, I can hover over PoList and it works); however, the status is doesn't exist (i.e., this if statement is always false). What am I doing wrong here
for (var x = 0; x < response.PoList.length; x++) {
if (response.PoList[x].Status == 'Not edited') {
response.PoList[x].StatusNum = 1;
} else {
response.PoList[x].StatusNum = 3
}
}
Edit
See screenshot below, I don't think it's a case-sensitivity issue. So, what's highlighted is response.PoList (not just response), x is currently 0, and if I hover over Status, I get nothing (no "undefined" tooltip or anything)
