Returns a Map from an object, or array of objects. Assumes the top-level properties of the object is the key.
const data = { Sally: { name: `Sally`, colour: `red` }, Bob: { name: `Bob`, colour: `pink` }};const map = fromObject(data);map.get(`Sally`); // { name: `Sally`, colour: `red` } Copy
const data = { Sally: { name: `Sally`, colour: `red` }, Bob: { name: `Bob`, colour: `pink` }};const map = fromObject(data);map.get(`Sally`); // { name: `Sally`, colour: `red` }
To add an object to an existing map, use addObjectEntriesMutate.
Returns a Map from an object, or array of objects. Assumes the top-level properties of the object is the key.
To add an object to an existing map, use addObjectEntriesMutate.