Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

reduce javascript

let fil = res.map(x=>Object.keys(x).filter(x=>x!='process' && x!='relay_type')
  .reduce((a,b)=>{
    a[b] = x[b]
    return a
  },{})).map(x=>Object.assign(x,{total:'wew'}))
Source by jsbin.com #
 
PREVIOUS NEXT
Tagged: #reduce #javascript
ADD COMMENT
Topic
Name
9+6 =