ixfx
    Preparing search index...

    Function fromObject

    • 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` }

      To add an object to an existing map, use addObjectEntriesMutate.

      Type Parameters

      • V

      Parameters

      • data: object | object[]

      Returns ReadonlyMap<string, V>