0

I am trying to convert Array into object

For example:

I want to convert, below array into

var a = ['a','b','c','d']

Below object

var obj = {
  'a': {
    'b': {
      'c': {
        'd': 'any value'
      }
    }
  }
}

Any one have any idea ?

Phil
  • 157,677
  • 23
  • 242
  • 245

0 Answers0