-4
I have a json in Javascript:
var cards = [
{
name: "Opção 1",
img: "images/opcao1.jpg",
id: "1"
},
{
name: "Opção 2",
img: "images/opcao2.jpg",
id: "2"
},
{
name: "Opção 3",
img: "images/opcao3.jpg",
id: "3"
}
];
My question is, how could I edit or add items to this json using for? The use of the for would be why I receive via Ajax values to be fed.
Let me see if I understand. Do you want to do a lopping with FOR to sweep your Ajax? Would that be it?
– Wan
Actually I want to fill in with more values, creating the Indice 4, 5, 6 etc
– Diogenes Oliveira Junior