I am trying to destructure an array of objects with three properties into three separate arrays for example
maybe something like
const {wlAddresses,wlTokens,wlTickets} = Object.map()
or
const [wlAddresses,wlTokens,wlTickets] = Object.map()
Where Object.map() returns something like this
[{ wlAddresses: '23',
wlTokens: 1,
wlTickets: 3 },
{ wlAddresses: '24',
wlTokens: 1,
wlTickets: 2 },
{ wlAddresses: '25',
wlTokens: 1,
wlTickets: 3 }]
I tried with that method and it only returns the first object, not the ones after. I know I can solve this problem by mapping the object and returning everything as separate arrays but maybe I can use destructuring to do this.
NOTE: Its just a question of can be done or not, I am not forcing an answer