0
I am creating an array in JSON, and would like to know how to create another array within the object.
var objeto;
objeto = {
"item" : [
{
"id" : delDiv,
"nome" : nomeItem.value,
"cod" : codItem.value
}
]
}
I would like to create a new item with new information without overwriting the already placed information.
I thought about it, but this code is inside a Function, and I wanted every time this function was run, to add one more item.
– Sumback
Usa push array
– Leonardo Alves Machado