Reference

Reference Data Types

Data Types

OtherEvergreenPublic

Dictionary

A common pattern in Javascript is to cast arrays of objects into a separate object, with a certain property defined as the new object’s key

For example, instead of…

[ { id: 'abfq-f39f', name: ‘Test’} ],

…you would have…

{abfq-f39f’: { id: 1, name: 'Test' } }

Why is it common?

Because it makes accessing the object you really want easier. This data type is usually called a dictionary.