File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,13 @@ export class OutputLoader {
8383 if ( typeof data === 'string' ) {
8484 // try parsing JSON string
8585 const textData : string = this . patchJson ( data ) ;
86- const objectData : any = JSON . parse ( textData ) ;
86+ let objectData : any = JSON . parse ( textData ) ;
87+
88+ if ( objectData . data ) {
89+ // use data object from REST response
90+ objectData = objectData . data ;
91+ }
92+
8793 if ( Array . isArray ( objectData ) ) {
8894 console . log ( 'data.table:format: JSON array' ) ;
8995 return objectData ;
@@ -106,6 +112,9 @@ export class OutputLoader {
106112 console . log ( 'data.table:format: JSON array' ) ;
107113 return jsonData ;
108114 }
115+ else {
116+ console . log ( 'data.table:format: JSON' ) ;
117+ }
109118
110119 if ( typeof jsonData === 'string' ) {
111120 if ( this . isCsv ( jsonData ) ) {
You can’t perform that action at this time.
0 commit comments