Can anyone please help me find a way to return objects from an object array to concat all of them into a new object array with object names instead of keys.
array = [
  1: {
    cart: { fruits: {}, vegetables: {}, juices: {}}
  },
  2: {
    cart: { boxes: {}, tools: {}, bottles: {}}
  }
]
I am trying to get this specific output in Vuejs using methods and computed properties, But I am only able to get the output with keys as a normal array. I need the object name instead of keys.
Expected output
newArray = {
  cart: { fruits: {}, vegetables: {}, juices: {} boxes: {}, tools: {}, bottles: {}}
}
 
     
    