array-to-plain-object Convert an array into a plain object Install npm i array-to-plain-object Usage const arrayToObject = require('array-to-plain-object') const obj = arrayToObject(['New York', 'Berlin', 'Sarajevo']) console.log(obj) // { 0: "New York", 1: "Berlin", 2: "Sarajevo" } License MIT