DWI
unknown
javascript
4 years ago
591 B
8
Indexable
xxx.map(x => { let newObject = Object.assign({}, x), slug = x.slug ? x.slug : x.name_slug, goal = x.goal ? x.goal : x.gt_count, current = x.current ? x.current : 0, icon = '' //ambil icon switch (slug) { case 'beauty-profile': icon = '' break; default: icon = '' break; } //currency if (slug === 'shopping-amount') { goal = curreny(goal) current = cuurency(goal) } return { ...newObject, slug, icon, goal, current } })
Editor is loading...