Jquery.map() To Parse Results From Select2 Ajax Call
I have the following select2 ajax call. How do I use the jquery $.map() to parse the returned json results. From the users array i need to get the Text and Value results. From the
Solution 1:
I was correct. I wasn't using the jQuery.map() correctly. It should be as follows:
results: $.map(data.users, function (users) {
return {
text: users.Text,
id: users.Value
}
}),
Post a Comment for "Jquery.map() To Parse Results From Select2 Ajax Call"