Hi there guys I am new in this but I have a array in my localstorage I get that array I save in old empty array, and I make a petition to the ajax and I try push the new data into my old array
$.getJSON(setUrl(pagination, page), function (response) {
var old = [];
old = JSON.parse(localStorage.getItem('msg'));
old.push(response.DATA);
console.log(old);
});
but the result I getting is some like this
I put all my new array inside a index of my old array what am I doing wrong ? can some one help me