I have an array:
[ [ \'cardType\', \'iDEBIT\' ], [ \'txnAmount\', \'17.64\' ], [ \'txnId\', \'20181\' ], [ \'txnType\', \'Purchase\' ], [ \'txnDate\
ES5 Version using .reduce()
.reduce()
const object = array.reduce(function(accumulatingObject, [key, value]) { accumulatingObject[key] = value; return accumulatingObject; }, {});