Answers for "get all properties of javascript object"

CSS
33

object keys javascript

const object1 = {
  a: 'somestring',
  b: 42,
  c: false
};

console.log(Object.keys(object1));
// expected output: Array ["a", "b", "c"]
Posted by: Guest on March-12-2020
2

js get all values of object

Object.values(object1)
Posted by: Guest on February-21-2020

Code answers related to "get all properties of javascript object"

Browse Popular Code Answers by Language