How to detect object length in es6

const myObj = {"name" : "abc", "city" : "xyz"};  

const result = Object.keys(myObj).length;

Comments

Popular posts from this blog

How to Remove Duplicates from Array in Javascript ES6

Es6 how to check if value is not null or undefined?