Message from JavaScript discussions

November 2017

— So?

— 

            var productdata = JSON.parse(localStorage.getItem('product'));
var i;
var idproduct = [];
for ( i = 0; i < productdata.length; i++) {
idproduct.push("JSON.parse(localStorage.getItem(product))["+i+"]['id']");
};

im write it like this

— A bit ugly but it can work

— Then in my ajax, im write

data : {'id' : [idproduct]}


but nothings happend

— Console.log your idproduct

— And debug your code

— If you want to program you need to learn your basic tools

— Already do it with

console.log('this is the product '+idproduct);

— May you console.log your array?

— After the for loop i mean

— Sorry late screenshoot, suddenly my screen freezing

— Lmfao