Wondering what’s next for npm?Check out our public roadmap! »

    to-object-map

    0.1.0 • Public • Published

    toObject

    Utility function to convert a given arry to Object

    Syntax

    convertArrayToObject(Array, 'key')

      const dataObj = {
      1: {name: "1", value: "one"},
      2: {name: "2", value: "two"},
      3: {name: "3", value: "three"},
    };
    const key = "name";
    const result = convertArrayToObject(data, key);
    

    Installation

    npm install to-object

    Keywords

    Install

    npm i to-object-map

    DownloadsWeekly Downloads

    0

    Version

    0.1.0

    License

    ISC

    Unpacked Size

    3.06 kB

    Total Files

    7

    Last publish

    Collaborators

    • avatar