I have a loop that loops through each item in an array and populates a check box.
the identity alternates throughout the loop.
"[{\"NAME\":\"TOM, B\",\"ID\":\"222\"},{\"NAME\":\"joe\",\"ID\":\"202\"}]"
how can I get the text of the select box to be the ID and the Name to be the text.
$.each($.parseJSON(json), function () {
$.each(this, function (key, value) {
drname.options.add(new Option(value, value[+1]));
});
});
I tried the [+1] as I've seen in similar questions but no dice.
thanks.