Object look like this:
informations = {
addresses: {
0: {phone: 0},
1: {phone: 1},
2: {phone: 2},
3: {phone: 3},
4: {phone: 4},
5: {phone: 5},
},
names: {
0: n0,
1: n1,
2: n2,
3: n3,
4: n4,
5: n5,
}
}
How can I get result of [{phone: 0, name: n0}, {phone:1, name: n1} .....{phone:5, name: n5}]
?
I was using .map
, but gives me error of "Property 'map' does not exist on type".
Is there any fast way to write the code instead of using for() loop?