I am looping to convert the array of array to object, I am splitting using comma"," but if my values have some comma it is also getting split. Eg: If my value has a date May 2, 2017 it is actually a single value, but it is splitting as May 2 as one value and 2017 as another value so, my whole is object getting changed.need help

I am reading from an excel sheet. My Output is array of array. I need to convert that to a json object.

```
var xls = require('excel');
 describe('TransactionDetails-Excel', function () {    
     it('External Type G Tranasaction Details validation', function (done) {
        xls('transactions.xlsx', function(err, data) {
            if(err){ 
                throw err;
            }
            else{
                console.log(data);
                console.log(JSON.stringify(convertToJSON(data)));
                done();
            }
        });
    function convertToJSON(array) {
        var first = array[0].join();
        var headers = first.split(',');
        var jsonData = [];
        for ( var iterator_i = 1, length = array.length; iterator_i < length; iterator_i++ ){
            var myRow = array[iterator_i].join();
            var row = myRow.split(',');
            var data = {};
            for ( var x = 0; x < row.length; x++ ){
                data[headers[x]] = row[x];
            }
            jsonData.push(data);
        }
        return jsonData;
    }
 });
 });

```

Excel sheet: transactions.xlsx
[click here to view screenshot of excel sheet](https://i.stack.imgur.com/nvZCd.png)

output: **data**

```
[ [ 'Transaction Id', 'Paid ', 'Time Created' ],
  [ '0YC0',
    'Joe\'s Generic Business \nperson@gmail.com',
    'Mar 2, 2012 14:28:36 PST' ],
  [ '8uyhr', 'mail@gmail.com', 'May 2, 2015  15:20:20 PST' ],
  [ '786YUH', 'mailtome@gmail.com', 'May 18, 2017 13:20:30 PST' ] ]

```

Output : //this is what i get

```
[{"Transaction Id":"0YC0","Paid ":"Joe's Generic Business \nperson@gmail.com","Time Created":"Mar 2","undefined":" 2012 14:28:36 PST"},   
{"Transaction Id":"8uyhr","Paid ":"mail@gmail.com","Time Created":"May 2","undefined":" 2015  15:20:20 PST"},    
{"Transaction Id":"786YUH","Paid ":"mailtome@gmail.com","Time Created":"May 18","undefined":" 2017 13:20:30 PST"}]

```

But final object should be:

```
[{"Transaction Id":"0YC0","Paid ":"Joe's Generic Business \nperson@gmail.com","Time Created":"Mar 2, 2012 14:28:36 PST"},   
    {"Transaction Id":"8uyhr","Paid ":"mail@gmail.com","Time Created":"May 2, 2015  15:20:20 PST"},    
    {"Transaction Id":"786YUH","Paid ":"mailtome@gmail.com","Time Created":"May 18, 2017 13:20:30 PST"}]

```

Thanks in Advance.