Is it possible to do a mapping with an Array as key/value ? Where an array would exist for each value ?
I'm actually looking to store structs in a mapping but can't seem to have it work.
Struct Foo{
uint x
}
mapping(uint => Foo[])foo; and even simply
mapping([] => uint)foo / (uint => [])foo; don't seems to work.
something so i can do :
foo.1.push(FooInstance)
foo.1[0] = FooInstance
Solidity Doc reads
Mapping types are declared as mapping _KeyType => _ValueType, where _KeyType can be almost any type except for a mapping and _ValueType can actually be any type, including mappings.
So aren't array considered a data type in solidity?