diff --git a/src/js/json.js b/src/js/json.js index d02b3db..c1966fa 100644 --- a/src/js/json.js +++ b/src/js/json.js @@ -95,7 +95,13 @@ function jsonToHTML (params) { } // Add the row contents and styles - htmlData += '' + stringData + '' + // if the data is of type array, splitting the cell to multiple rows + if (typeof stringData === 'object' && stringData.length && stringData.length > 0) { + const subTableHtmlData = stringData.reduce((acc, eachRowData) => (acc + '' + eachRowData + ''), '') + htmlData += '' + subTableHtmlData + '
' + } else { + htmlData += '' + stringData + '' + } } // Add the row closing tag