diff --git a/src/frontend/src/components/dataOutputComponent/index.tsx b/src/frontend/src/components/dataOutputComponent/index.tsx index 9a3b2f66d..5fe4d3637 100644 --- a/src/frontend/src/components/dataOutputComponent/index.tsx +++ b/src/frontend/src/components/dataOutputComponent/index.tsx @@ -10,9 +10,14 @@ function DataOutputComponent({ columnMode = "union", }: { pagination: boolean; - rows: any; + rows: any[]; columnMode?: "intersection" | "union"; }) { + // If the rows are not an array of objects, convert them to an array of objects + if(rows.some((row) => typeof row !== "object")) { + rows = rows.map((row) => ({ data: row })); + } + const columns = extractColumnsFromRows(rows, columnMode); const columnDefs = columns.map((col, idx) => ({