Wouldn´t that be the reason, why the others used structs and arrays for their inventory?
The struct can contain all the Item infos/variables like “Item ID”, “IsStackable”, “Amount” etc., and the array holds all the structs/items - and if i am not mistaken, unlike a map, an array can have several items of the same type with just some slight changes in their variables.