I am working on a j2ee application. In my application I have a drop-down list(or Select element). I want to populate this drop-down list with JSON data as a Ajax response.
Try as follows
success: function (response) { for (var i = 0; i < response.length; i++) { $("#xxx").append("" + response[i]["name"] + ""); } }