I have the following json array returning from an ajax call:
{"err":"err_type","fields":["field1","field2"]}
when trying to print this function:
$.each(data.fields, function (i, field) {
console.log(field);
$.each(field, function (j, f) {
$('[name="'+f+'"]').addClass('form_err');
console.log(f);
});
});
I get the following:
data1
TypeError: invalid 'in' operand a
...turn function(b){return db(a,b).length>0}}),contains:fb(function(a){return funct...
and therefore I cannot figure out how to use this array! Does anyone have an idea?
source
share