What's the easiest way to make nested objects in TypeScript? I want to be able to add elements in nested objects like this:
let dictionary: { [key: string]: { [key: string]: number } } = {};
dictionary['x']['y'] = 2
dictionary['x']['z'] = 5
I expect:
console.log(dictionary['x']) // -> {'y': 2,'z': 5}
console.log(dictionary['x']['y']) // -> 2