Javascript – How to give each element of an array of ojects a key
If I have an array that looks like: arr =[ { id: 'f794',label: 'Blue Bird' } ] how do I give the element of it a key so I get arr =["myKey":{ id: 'f794',label: 'Blue Bird' } ] I have…