From c7f09354f726679adcb86d3cd73cee66bb31c658 Mon Sep 17 00:00:00 2001 From: Palash Gupta Date: Mon, 15 May 2023 18:04:58 +0530 Subject: [PATCH] fix : parsing issue is fixed in the table view (#2693) * fix: parsing is updated --- frontend/src/container/LogDetailedView/TableView.tsx | 2 +- frontend/src/container/LogDetailedView/utils.ts | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/frontend/src/container/LogDetailedView/TableView.tsx b/frontend/src/container/LogDetailedView/TableView.tsx index eea61f2a32..ef30d1471d 100644 --- a/frontend/src/container/LogDetailedView/TableView.tsx +++ b/frontend/src/container/LogDetailedView/TableView.tsx @@ -89,7 +89,7 @@ function TableView({ logData }: TableViewProps): JSX.Element | null { if (!isEmpty(parsedBody)) { return ( => { if (typeof value === 'string') { return recursiveParseJSON(value); } + if (typeof value === 'object') { + Object.entries(value).forEach(([key, val]) => { + if (typeof val === 'string') { + value[key] = val.trim(); + } else if (typeof val === 'object') { + value[key] = recursiveParseJSON(JSON.stringify(val)); + } + }); + } return value; } catch (e) { return {};