Here is an example of my array structure:
myArray = [
{SKU: "Hoo12", Name: "ACyrlic watch",OrderNo:"26423764233456"},
{SKU: "S0002", Name: "Princes Geometry",OrderNo:"124963805662313"},
{SKU: "Hoo12", Name: "ACyrlic watch",OrderNo:"122324234234"},
]
I am trying to convert the array to the following format:
OutPut = [
{SKU: "Hoo12",Name: "ACyrlic watch", OrderNo: ["26423764233456", "122324234234"]},
{SKU: "S0002", Name: "Princes Geometry", OrderNo: ["124963805662313"]}
]
I have experimented with different methods, but I am struggling to group similar values together.