let transformedData ={}
finalItemArray.forEach(item => { //finalItemArray is array of object
let prodGroup = item.ProductGroup;
// Create an object for the current item excluding "ProductGroup"
// Initialize an array for the current "ProductGroup" if it doesn't exist
transformedData[prodGroup] = transformedData[prodGroup] || [];
// Add the current item to the array
transformedData[prodGroup].push(item);
});