TS2488

error TS2488: Type ‘{ [label: string]: string; }’ must have a ‘Symbol.iterator‘ method that returns an iterator.

Solution

You have to add a property called [Symbol.iterator] to your object. The value of this property has to return an iterator. Here you can learn how to create an iterator.