I have some info in JSON which is coming from PHP
via Ajax
{"5":"rahul","26":"karan","28":"jatin"}
I wants to get key separate which are 5,26,28
and separate name which are rahul,karan,jatin
I use this code in java script
. But doesn't get result as i want.
for (var key in ajaxresponse) {
if (ajaxresponse.hasOwnProperty(key))
{
alert(key + " -> " + JSON.stringify(ajaxresponse[key]));
}
}