Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript object get value by key

const person = {
  name: 'Bob',
  age: 47
}

Object.keys(person).forEach((key) => {
  console.log(person[key]); // 'Bob', 47
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #object #key
ADD COMMENT
Topic
Name
9+9 =