Script
var data = '{"Err0":"Only letters and white space allowed in Name"}';
try {
//convert to json string
arr = $.parseJSON(data); //convert to javascript array
arr.each(function(key,value){
console.log(value);
});
} catch (e) {
$("#id").val(data);
}
Trying to get the value of the json but its throwing error
Any help
Thanks
$data != data.. That error shouldn't have been a pretty simple clue$.parseJSON()returns an object (and not a jQuery object) which has no.each()method