arrayToObject

Function

Given an array of objects, convert into an object, with each entry assigned the key via the keyprop

  • arrayToObject(arr: any[], key: string) : any

Parameters

Parameter Type Default Notes
arr Required any[]
key Required string

Returns

any

Function defined in common/src/util.ts:51