This is my JSON file output:
let employees = [{
"id":1,
"name":"Lann",
"username":"brot",
"email":"[email protected]",
"address": {
"city":"Gweh",
"zipcode":"92998-3874",
"geo": {
"lat":"45",
"lng":"77"
}
}
}]
How I get id, name and email from that like below:
{
"id":1,
"name":"Lann",
"email":"[email protected]"
}
}, ie}]should be}}]Whith a correct input, you canconsole.log(employees[0].name);for example.