add key to array items using javascript es6 map

I have an array that looks like this:

Array[8]
0:
{…}
content:”Service stations”
group:”1″
order:”0″

and I want to add a key to each element using ES6 map function but I cannot work out the syntax?

something like this?

const items = learning_check.map(i, group, content, order) => {
return [index, group,content, order]
}

Read more here:: add key to array items using javascript es6 map

Leave a Reply

Your email address will not be published. Required fields are marked *