I am having an array that consists the objects with a key, value how can we iterate each object for caste and id.
[
Object {
you can use jquery to iterate through all the objects jQuery wants you to fill a callback function, which jquery will call back. The first input parameter will be given the key and the second input parameter the value:
$.each(dataList, function(index, object) {
$.each(object,function(attribute, value){
alert(attribute+': '+value);
});
});
documentation: http://api.jquery.com/jQuery.each/