I have an array as followed:
let arr = [InventoryItem(capacity: "1T", chainLength: 55, speed: "32FPM", voltage: "110V", frameSize: "Small", controlStation: "None"),
InventoryItem(capacity: "1T", chainLength: 55, speed: "32FPM", voltage: "110V", frameSize: "Small", controlStation: "None"),
InventoryItem(capacity: "1T", chainLength: 55, speed: "32FPM", voltage: "110V", frameSize: "Small", controlStation: "None"),
InventoryItem(capacity: "1T", chainLength: 55, speed: "32FPM", voltage: "110V", frameSize: "Small", controlStation: "None"),
InventoryItem(capacity: "1T", chainLength: 55, speed: "32FPM", voltage: "110V", frameSize: "Small", controlStation: "None"),
InventoryItem(capacity: "1/2T", chainLength: 65, speed: "16FPM", voltage: "208V", frameSize: "Standard", controlStation: "Integrated"),
InventoryItem(capacity: "1/2T", chainLength: 65, speed: "16FPM", voltage: "208V", frameSize: "Standard", controlStation: "Integrated"),
InventoryItem(capacity: "1/2T", chainLength: 65, speed: "16FPM", voltage: "208V", frameSize: "Standard", controlStation: "Integrated"),
InventoryItem(capacity: "1/2T", chainLength: 65, speed: "16FPM", voltage: "208V", frameSize: "Standard", controlStation: "Integrated")]
I want to group them into other array or dictionary where all of the elements have same attributes. Is there way to do it?