Open utterances-bot opened 1 year ago
Use let k: keyof T and a for-in loop to iterate objects when you know exactly what the keys will be or Object.entries to iterate over the keys and values of any object.
https://trungk18.com/experience/how-to-iterate-over-objects-in-typescript/
Thank you so much you saved me!
How to iterate over objects in TypeScript - Trung Vo
Use let k: keyof T and a for-in loop to iterate objects when you know exactly what the keys will be or Object.entries to iterate over the keys and values of any object.
https://trungk18.com/experience/how-to-iterate-over-objects-in-typescript/