1const persons = {
2 john: { age: 23, year:2010},
3 jack: { age: 22, year:2011},
4 jenny: { age: 21, year:2012}
5}
6const resultArray = Object.keys(persons).map(index => {
7 let person = persons[index];
8 return person;
9});
10
11
1var resultArray = Object.keys(persons).map(function(personNamedIndex){
2 let person = persons[personNamedIndex];
3 // do something with person
4 return person;
5});
6
7// you have resultArray having iterated objects