#record<string, string> better or map<string, string>?
7 messages · Page 1 of 1 (latest)
I would say use a Record unless you have some specific need for a map
Map<K, V> can be very performant, even more than regular objects
however, if you create objects with well known keys and always provide all the keys when building the object (even if you set the values to undefined), then then engine can also optimize your code
really depends what you're trying to do, how many reads and writes you'll have, etc.
@granite junco
the case if just i get a structure in an API request
i am iterating the structure and creating a map between playerId and playertype