Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

SnowranCruzick's avatar

How can i convert array of objects data into a Countries-Map data format?

I have a array of objects data in

const data = [ { total: 9, country: 'IN' }, { total: 0, country: 'AF' ]}; But all i need to convert above data into countries Map(plugin) format

data = {IN: { value: 9 },AF: { value: 0}}; Is there any possibilities https://shagle.download converting into this format.

Please help https://omegle.ws me in these issue.

Thanks in Advance

0 likes
1 reply

Please or to participate in this conversation.