Goal: I wish to store an array of names with an address in a smart contract. It's more like Key-Value pairs where addresses are paired with a list of type strings.
Can I use mapping to implement this? See below for instance.
mapping(address => strings[]) userAddress2UserNames;
Or, there is a different approach to it?
Experiments I performed
I got no error when I compiled the above code but when I call a method which returns string[] from this mapping I got an error stated below.
TypeError: This type is only supported in the new experimental ABI encoder. Use "pragma experimental ABIEncoderV2;" to enable the feature.
I'm not much aware of this version but I am assuming I should not do production level implementation with it because may be it's not stable. (Please correct me if I am wrong)
Please suggest me a way to achieve my goal.