Answers for "how to get the number of key value pair from dictionary in javascript"

0

length of dict js

// check length of dictionary

let dict = {a:1 , b:2 , c:3}

console.log(Object.keys(dict).length) // expected result : 3
Posted by: Guest on July-20-2020
2

javascript get dictionary values

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

console.log(Object.values(object1));
// expected output: Array ["somestring", 42, false]
Posted by: Guest on October-28-2020

Code answers related to "how to get the number of key value pair from dictionary in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language