1

I have an object in this form:

{ 
  list: '1',
  'filter.dealStatus': 'Accepted',
  'filter.type': 'longTerm' 
}

Is there an easy way to convert this into a structured object where the dotted properties create a nested object, something like this:

{ 
      list: '1',
      filter: {
                dealStatus: 'Accepted',
                type': 'longTerm'
              }
}

I am asking if there is a default method in js/nodejs for this.

Ankur Lathwal
  • 725
  • 1
  • 7
  • 24

0 Answers0