Way to chain a string and object with aggregation

Hello,
If you can help me please :palm_up_hand:
I have array of strings like this: [“61edd59612d7aa0045a5e829”, “61edd59612d7aa0045a5e830”] for example. and want simple to get new array by appending each string to object contain those properties, like so:
[ { “61edd59612d7aa0045a5e829”: { “lastMonth” : 0, “total” : 0 } },
{ “61edd59612d7aa0045a5e830”: { “lastMonth” : 0, “total” : 0 } }
]
notice that i can’t know the length of the input array,

TNX :innocent:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.