js group objects in an array js group objects in an array var groupBy = function(xs, key) { return xs.reduce(function(rv, x) { (rv[x[key]] = rv[x[key]] || []).push(x); return rv; }, {}); }; https://www.consolelog.io/group-by-in-javascript/ https://st…
keys_.keys(object) Retrieve all the names of the object's properties. _.keys({one: 1, two: 2, three: 3}); => ["one", "two", "three"] values_.values(object) Return all of the values of the object's properties. _.values({o…