diff --git a/src/ui/components/elements-inspector/sidebar.js b/src/ui/components/elements-inspector/sidebar.js index eab4a8f46..55c4ea757 100644 --- a/src/ui/components/elements-inspector/sidebar.js +++ b/src/ui/components/elements-inspector/sidebar.js @@ -131,15 +131,39 @@ export class InspectorSidebar extends Component { []; for (const key in element.data) { - sections.push( - , - ); + if (key === 'Extra Sections') { + for (const extraSection in element.data[key]) { + let data = element.data[key][extraSection]; + + // data might be sent as stringified JSON, we want to parse it for a nicer persentation. + if (typeof data === 'string') { + try { + data = JSON.parse(data); + } catch (e) { + // data was not a valid JSON, using string instead + } + } + sections.push( + , + ); + } + } else { + sections.push( + , + ); + } } if (GK.get('sonar_show_console_plugin') && this.state.isConsoleEnabled) {