I have an Object. How to get number of nested objects in a
?
a = {
firstNested: {
name: 'George'
}
secondNested: {
name: 'James'
}
}
I supposed to use .length
which is usually used for arrays. What should I do in this case?