bad string to javascript object

Legs: [{
  'dollar': {
    xmlns: 'HitchHiker.FlightAPI.FareRequestStructs'
  },
  FareRequestLeg: [{
    ArrivalSearchRadius: ['0'],
    ArrivalTime: [{
      'dollar': {
        'xsi:nil': 'true'
      }
    }],
    Class: ['Economy'],
    Connections: [''],
    DepartureDate: ['2020-10-22T00:00:00'],
    DepartureSearchRadius: ['0'],
    DepartureTime: [{
      'dollar': {
        'xsi:nil': 'true'
      }
    }],
  }]
}]

I have some thing like that. I had a xml file. I use Xml2js for parsing , here i got a this string I want Object from of this.

clear view : https://pastebin.com/ZvPAbdgw



Read more here: https://stackoverflow.com/questions/64400996/bad-string-to-javascript-object

Content Attribution

This content was originally published by Nazrul Islam at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: