Is there a way to efficiently create an array of objects with properties for "name" and "shade"?
[{
"name": "black",
"shade": "dark"
}, {
"name": "white",
"shade": "light"
},
{
"name": "red",
"shade": "dark"
}, {
"name": "blue",
"shade": "dark"
},
{
"name": "yellow",
"shade": "light"
}]
Currently, I have two separate arrays:
name = ["black","white","red","blue","yellow"]
shade = ["dark","light","dark","dark","light"]
What are the steps needed to combine these arrays into one cohesive object array structure?