Array.prototype.toObjectByProperty( element=> )

T.J. Crowder tj.crowder at
Sat Aug 5 11:47:33 UTC 2017

On Sat, Aug 5, 2017 at 12:41 PM, T.J. Crowder
<tj.crowder at> wrote:

Apologies, better proofreading required, left out the `"id"` argument:

const a = [{id: "tjc", name: "T.J. Crowder"}, {id: "nc", name: "Naveen
Chawla"}, {id: "lh", name: "Lachlan Hunt"}];
const index = Object.from(a, "id");

-- T.J. Crowder

More information about the es-discuss mailing list