var saurabhjson= JSON.stringify(data)
above returns this json
saurabhjson {"recordId":5555,"Key":"5656"}
if print the first array in console it get undefined value
console.log("saurabhjson[0].recordId",saurabhjson[0].recordId);
i want to do some check like this
if(saurabhjson[0].recordId == 5555) {
$('#div_ajaxResponse2').text("another success");
}
JSON.stringify(), remove itdata.recordIdvar saurabhjson= JSON.stringify(data)and simply access the values bydata.recordIddata? Is it a JS object, or a string? Should you be doingJSON.parse()instead ofJSON.stringify()? Give us a full example to debug.