Learning how to access property values.
If I have
let object1 = [{name: "HappyHands31"}, {job: "website developer"}, {city: "Chicago"}];
How would I console.log just the value of the second object? I.e. "website developer".
I know how to console.log the entire key-value pair (or object) by using .find():
let object1 = [{name: "HappyHands31"}, {job: "website developer"}, {city: "Chicago"}];
console.log(object1.find(function(element) {
return element.hasOwnProperty("job");
}
));
But what about just the value of this pair?
{name: "HappyHands31", job: "website developer", ...}?