Closed gitricko closed 4 years ago
eg:
var src1 = { 'txn': [{"datamov": "07/01/2020"},{"datamov": "07/01/2020"}] } var map1 = { "txn[].datamov": { key: "txn[].dat", transform: val => moment(val, 'DD/MM/YYYY').format('YYYY-MM-DD') } }; var expect = { 'txn': [{"datamov": "2020-07-01"},{"datamov": "2020-07-01"}] } var result = om(src1, map1);
but what i got was: { txn: [ { dat: 'Invalid date' }, { dat: 'Invalid date' } ] }
{ txn: [ { dat: 'Invalid date' }, { dat: 'Invalid date' } ] }
Could not figure out what was wrong
Closing this but will watch #77
eg:
but what i got was:
{ txn: [ { dat: 'Invalid date' }, { dat: 'Invalid date' } ] }
Could not figure out what was wrong