4 ms·
I think you have to use square brackets... stuff := {['k1','v1'],['k2','v2'],['k2','v3']}; print (stuff('k1')); print (stuff{'k2'});
by GregBuchholz 12y ago
I think you have to use square brackets...
stuff := {['k1','v1'],['k2','v2'],['k2','v3']};
print (stuff('k1'));
print (stuff{'k2'});
- perfunctory 12y agoWhat I meant is that it sounds like it's possible to have two entries in a map with the same key.
- GregBuchholz 12y agoYes, they are multi-maps, and can have multiple values for the same key. In that case you have to use curly brackets to deference, and you'll get a set back with the values.