I need help combining two arrays that contain objects and reassigning the values in a standard format. Can anyone provide some guidance? Thank you.
Here is my current situation:
array1 = [{Apple: Ken, Orange: Mary, Melon: Tina, Strawberry: Jessica, Mango: Susana, Lemon: Julia}]
array2 = [{Apple: 12, Orange: 6, Melon: 7, Strawberry: 16, Mango: 15, Lemon: 11}]
Desired outcome:
arrayCombined = [[Apple: Ken, 12],[Orange: Mary, 6], [Melon: Tina, 7], [Strawberry: Jessica, 16], [Mango: Susana, 15], [Lemon: Julia, 11]]
Intended table display:
Fruit | Fruit(buyer) | Fruit(number of purchase) | even-number prize
---------------------------------------------------------------------
Apple | Ken | 12 | Yes
Orange | Mary | 6 | Yes
Melon | Tina | 7 | No
Strawberry | Jessica | 16 | Yes
Mango | Susana | 15 | No
Lemon | Julia | 11 | No