0👍
to reduce your array to a single object you can do something like
let keyedOb = maplist.reduce((o,v) =>{ o[v.id] = v.name; return o},{})
Source:stackexchange.com
0👍
to reduce your array to a single object you can do something like
let keyedOb = maplist.reduce((o,v) =>{ o[v.id] = v.name; return o},{})