I have this array of objects. Im trying to get the "name" property to return or console log
I've tried using indexes(probably wrong) so Im pretty stuck.
var peopleArray = [{
name: "Harrison Ford",
occupation: "Actor"
},
{
name: "Justin Bieber",
occupation: "Singer"
},
{
name: "Vladimir Putin",
occupation: "Politician"
},
{
name: "Oprah",
occupation: "Entertainer"
}
]
Result should be:
["Harrison Ford", "Justin Bieber", "Vladimir Putin", "Oprah"]