0👍
Make an Object:
data: {
form: [{}]
},
If this is your array:
list = [
[value, is_current],
[value, is_current],
[value, is_current],
];
Then go over this array and add each inner array to the object:
list.forEach(function(element) {
that.form.push({value: element[0], key: element[1]});
});
See this fiddle for reference:
Source:stackexchange.com