Answers for "Capture object attribute"

2

Capture object attribute

const json = {
    nome: "nome",
    sobrenome: "sobrenome",
    idade: "idade",
    endereco: "endereco",
    empresa: "empresa",
    telefones: [
        {
            "residencial": "residencial"
        },
        {
            "celular": "celular"
        }
    ]
}

console.log(Object.keys(json))
// ["nome", "sobrenome", "idade", "endereco", "empresa", "telefones"]
Posted by: Guest on May-12-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language