JSFiddle - React, Tailwind, and code Playground
by dhchow
JavaScript
var items = [{name: "one", id: 1},{name: "two", id: 2},{name: "three", id: 3}];
var ids = $(items).map(function(){ return this.id; });
console.log(ids);
$.ajax({
type: "POST",
url: "http://test.com",
data: {
test: ids // Workaround: $.makeArray(ids)
}
});