From ad837aa0c827131a5b71e758eb5a8dbc7430f184 Mon Sep 17 00:00:00 2001 From: Fabio Pellanda Date: Fri, 1 May 2020 03:30:28 +0200 Subject: [PATCH] map arrayValue --- index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 695b5ff..5864ec4 100644 --- a/index.js +++ b/index.js @@ -253,7 +253,13 @@ const formatRecords = (recs,columns) => { // Look for non-null fields Object.keys(field).map(type => { if (type !== 'isNull' && field[type] !== null) { - fmap[i]['field'] = type + if (type === 'arrayValue') { + field = field.arrayValue + const [arrayType] = Object.keys(field) + fmap[i]['field'] = arrayType + } else { + fmap[i]['field'] = type + } } })