I have an array:
[ [ \'cardType\', \'iDEBIT\' ], [ \'txnAmount\', \'17.64\' ], [ \'txnId\', \'20181\' ], [ \'txnType\', \'Purchase\' ], [ \'txnDate\
Short ES6 way with Airbnb code style
Exemple:
const obj = arr.reduce((prevObj, [key, value]) => ({ ...prevObj, [key]: value }), {});