I am trying to convert this array to object with same custom key
let array=['a','b','c']
let y= Object.assign({}, [...array]);
I want resualt like this
[{'name':'a'},{'name':'b'},{'name':'c'}]
how I can do this ?
I am trying to convert this array to object with same custom key
let array=['a','b','c']
let y= Object.assign({}, [...array]);
I want resualt like this
[{'name':'a'},{'name':'b'},{'name':'c'}]
how I can do this ?