I have this below json object:
{
contacts:
[ { id: 52,
gsm: '919191919191',
firstName: 'Ganesh' },
{ id: 51,
gsm: '123456789',
firstName: 'Mohamed' },
{ id: 53,
gsm: '987654321',
firstName: 'Mohamed' } ],
groups:
{ contactsCount: 1,
id: 40,
groupname: 'Angular' }
}
I want my final output like this:
[ { groupId:40 , contactId:52 }; { groupId:40 , contactId:51 } ; { groupId:40 , contactId:53 } ]
How to do using map or using any JS methods.
;sign, not:?{ groupId:40 ; contactId:52 }or{ groupId:40: contactId:52 }