TypeScript, Looping through a dictionary

To loop over the key/values, use a for in loop:

for (let key in myDictionary) {
    let value = myDictionary[key];
    // Use `key` and `value`
}

Leave a Comment