AykutSarac преди 3 години
родител
ревизия
16217646f7
променени са 1 файла, в които са добавени 6 реда и са изтрити 2 реда
  1. 6 2
      src/utils/json-editor-parser.js

+ 6 - 2
src/utils/json-editor-parser.js

@@ -1,6 +1,8 @@
+import { FlowElement } from "react-flow-renderer";
+
 /**
 /**
- * @param {never[] | Object} input 
- * @returns {import("react-flow-renderer").FlowElement[]}
+ * @param {never[] | Object} input
+ * @returns {FlowElement[]}
  */
  */
 export const parser = (input) => {
 export const parser = (input) => {
   try {
   try {
@@ -54,6 +56,8 @@ export const parser = (input) => {
 
 
     const res = extract(input);
     const res = extract(input);
 
 
+    console.log([...flatten(res), ...relationships(res)]);
+
     return [...flatten(res), ...relationships(res)];
     return [...flatten(res), ...relationships(res)];
   } catch (error) {
   } catch (error) {
     console.error("An error occured while parsin JSON data!", error.stack);
     console.error("An error occured while parsin JSON data!", error.stack);