how to update multiple items at once in ajax I have got these IDs and quantity to update I have 5 IDs and their quantity I want to update them all at one click Here is my code i dont know how to combine these Ids and quantity into one variable so I can update
ID 39470423048307 quantity 0 ID 32164693278835 quantity 0 ID 32164693835891 quantity 0 ID 32164692328563 quantity 2
how to use jQuery.post('/cart/update.js', {updates: {794864053: 0, 794864233: 0}});
var multiple_products = " code which can combine all IDs and qunatity values"
$.ajax({
type: 'POST',
cache:false,
url: '/cart/change.js',
data: multiple_products,
dataType: 'json',
success: function () {
console.log("success ");
},
});