I'm receiving a response from json in the below format
["user0", "user1", "user2", "user3", "user5", "user6", "user7"]
and i need to convert it into the below Format
[
{ id: 'user0', text: 'user1'},
{ id: 'user1', text: 'user2'},
{ id: 'user2', text: 'user3'},
{ id: 'user3', text: 'user4'},
{ id: 'user5', text: 'user5'},
{ id: 'user6', text: 'user6' },
{ id: 'user7', text: 'user7' }
];
How this can be achieved in javascript.