How to loop through JSON if it is not an array but an object

You can use Object.values, Object.keys, and Object.entries. When you are using firebase databases, the keys are automatically generated and you are not interested in them, so you can just use Object.values and use map to loop through them.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a comment