My idea is to be able to access one of the names and be able to insert or change the values of the person you want. For example, how can I edit the street, door and floor? I know that it can be done in php with array_column but I don't know what the equivalence would be in JavaScript.
var persona = {
persona1: {
nombre: "juan",
casa: {
calle: "calle",
numero: "1",
piso: {
planta: "1",
puerta: "1"
},
},
telefono:"612345789",
},
persona2: {
nombre: "ana",
casa: {
calle: "calle2",
numero: "2",
piso: {
planta: "2",
puerta: "2"
},
},
telefono:"612345789",
}
}
I know I could do it in php, but in this case I need to do it with JS
Hello @David Gonzalo, being a JSON in javascript it is an object, you only have to navigate through its properties, more or less as you would in php or in any other language.