var result={"clientIds":[{"id":0,"clientId":"check123"},{"id":1,"clientId":"check234"}]};
$.each(result, function (key, data) {
$.each(data, function (index1, valindex) {
$.each(valindex,function(finalk,finalv) {
alert("Final Key::::"+finalk+"Final Value::::"+finalv);
$('#MySelect').append($("<option value='finalv'></option>").val(finalv.Value).text(finalv.Text));
// alert("Working");
});
});
});
I have code like this. In last each
loop I get values 0,check123,1,check234
The above values I want to put in a dropdown
My code is:
$('#MySelect').append($("<option></option>").val(finalv.Value).text(finalv.Text))
When I execute the code, field's name is not displayed in dropdown. I want value names as each option. How can I do this?