Sniberb
Sniberbβ€’2y ago

πŸŽƒ Spookyberb πŸŽƒ – 09-11 Nov 17

How could I iterate over an object, and convert any string prop thats falsy to a -?
4 Replies
ScriptyChris
ScriptyChrisβ€’2y ago
Object.entries + loop
Sniberb
Sniberbβ€’2y ago
Object.entris + map? I want it to a new variable, thats the cleanest way right?
ScriptyChris
ScriptyChrisβ€’2y ago
Can be You have to call Object.fromEntries afterwards to transform it into object again
reactibot
reactibotβ€’2y ago
This thread hasn’t had any activity in 12 hours, so it’s now locked. Threads are closed automatically after 12 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1042728665479385108