I am having an issue where sometimes the object I want to iterate through is just a plain object but sometimes it's an array, for both I am using the {{#each}} Handlebars built-in helper.
When the object is an array, it works just fine, but when it is a plain object it is not working. How can I get around that?
Thanks!
when iterating over properties {{@key}} refers to property name, and {{this}} refers to property value
more here https://handlebarsjs.com/guide/builtin-helpers.html#each
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With