Create array of objects based on another array?
- by xckpd7
I want to take an array like this:
var food = [
{
name: 'strawberry',
type: 'fruit',
color: 'red',
id: 3483
},
{
name: 'apple',
type: 'fruit',
color: 'red',
id: 3418
},
{
name: 'banana',
type: 'fruit',
color: 'yellow',
id: 3458
…