#How can I access this Array?

2 messages · Page 1 of 1 (latest)

brisk plank
#

Do you want to console.log what's inside?

#

Check this example

let myArray = [
  { name: "John", age: 30 },
  { name: "Jane", age: 25 },
  { name: "Bob", age: 40 }
];

  console.log(myArray[0].name); // output: "John"
  console.log(myArray[0].age); // output: 30