how to add keys to a dictionary in Typescript?

By Bahar Mohammadi

I have the following property in my typescript view model, how do I add keys to it?
_flatListRowsLookupByMediatype: { [key: string]: Array } = {};

I have _flatListRowsLookupByMediatype[key] = value;
but it overwrites the previous key everytime I call that method.

Source: Stack Overflow


Share it with your friends!

    Fatal error: Uncaught Exception: 12: REST API is deprecated for versions v2.1 and higher (12) thrown in /home/content/19/9652219/html/wp-content/plugins/seo-facebook-comments/facebook/base_facebook.php on line 1273