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
  • 141,914
  • 21
  • 225
  • 223

0 Answers0