sergey-t
10/4/2017 - 6:12 PM

Array

const list = list.filter((x, i, a) => a.indexOf(x) == i)
const array = [{id:1, value:1}, {id:2, value:2}];
const dict = array.reduce((o,e) => ({...o, [e.id]: e.value}), {});