I have List of Object as a response from server in javascript. How i can access object members or how i can loop through the object using jquery.?
This is my current script.
main.addDrodownOptionsforRoom = function (selector, data)
{
var dropdown = $(selector);
if (dropdown !== null)
{
dropdown.html("");
dropdown.append($('<option></option>').val("").html("Select..."));
dropdown.append($('<option></option>').val("All").html("All"));
$.each(data, function (index, val)
{
dropdown.append($('<option></option>').val(val).html(index));
});
$(selector).removeAttr("disabled");
}
};
In "data" i can see the List of objects. Can any body tell me how to access the members in it.