I need an array that I put into a JSON and store it in localStorage can add a value to an array that is already saved
Here is where I keep the arrangement:
var palabra = $("#txtpalabra").val();
var pista = $("#txtpista").val();
Palabras.push(palabra);
Pistas.push(pista);
localStorage.setItem("Palabras", JSON.stringify(Palabras));
localStorage.setItem("Pistas", JSON.stringify(Pistas));
And he keeps it like this:
0:"santos" 1:"laguna"
And I need you to keep it that way:
0:{"santos", "laguna"}