I have this array:
var test.qs =
[
{"answer":null,
"testQuestionId":710
"synchronized":true},
{"answer":null,
"testQuestionId":711
"synchronized":false
]
I would like to call a function on all the array objects that have the syncronized property equal to false like this:
if (!test.qs[x].synchronized) {
httpPutTestQuestion(number)
.success(function (data) {
test.qs[x].synchronized = true;
})
}
But how can I do this as if I put this into a for loop then when the function returns I won't still have the value x?
var test.qsis not valid javascript.