Browse Source

fix object key visible

AykutSarac 3 years ago
parent
commit
05881ab4fc
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/utils/json-editor-parser.js

+ 3 - 1
src/utils/json-editor-parser.js

@@ -22,7 +22,9 @@ export const parser = (input) => {
         id: nextId(),
         data: {
           label: Object.fromEntries(
-            Object.entries(o).filter(([k, v]) => !Array.isArray(v))
+            Object.entries(o).filter(
+              ([k, v]) => !Array.isArray(v) && !(v instanceof Object)
+            )
           ),
         },
         position: { x: 0, y: 0 },