1var person={
2 "first_name":"Harry",
3 "last_name":"Potter",
4 "age":14
5};
6var personSize = Object.keys(person).length; //gets number of properties (3)
1//length of this object is 4
2let object = {
3 'A':{
4 '10':['a','b','c']
5 },
6 'B':{
7 '20':['a','b','c']
8 },
9 'C':{
10 '30':['a','b','c']
11 },
12 'D':{
13 '40':['a','b','c']
14 },
15}
16
17//Get the keys of the object (A,B,C,D) and print how many there are
18Object.keys().length
19> prints: 4
20