0.1.0 • Published 5 years ago
to-object-map v0.1.0
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
0.1.0
5 years ago