Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 142504

How to iterate over object properties in Pug

$
0
0

I've done this plenty of times but can't remember the API.

Amazingly I cannot put a search term into Google that will give me an answer either, so I will ask it.

Given this object:

{ redeemed: false, redeemable: false, _id: 5e36319150eb6a6abd053bc3, user: 5e362dc07fc4bb348160c78f, createdAt: 2020-02-02T02:18:57.620Z, updatedAt: 2020-02-02T02:18:57.620Z, __v: 0 }

How can I iterate over all the properties in Pug. Something like

each property in object.properties()
  p= property

Viewing all articles
Browse latest Browse all 142504

Trending Articles