{{#if headers}} {{#unless flatTable}} Key Value {{/unless}} {{/if}} {{#each columnNames as |colName|}} {{#with (lookup (lookup ../rows "0") "data") as |rowData|}} {{#with (lookup rowData colName) as |cellValue|}} {{kebabToTitleCase colName}} {{#if (isObject cellValue)}} {{> table-template.html rows=(objectEntries cellValue) headers=false flatTable=false hasRows=true isNested=true}} {{else if (isArray cellValue)}}{{#each cellValue}}{{#if (isObject this)}} {{> table-template.html rows=(objectEntries this) headers=false flatTable=false hasRows=true isNested=true}} {{else}}{{this}}{{#unless @last}}, {{/unless}}{{/if}}{{/each}}{{else}}{{cellValue}}{{/if}} {{/with}} {{/with}} {{/each}}