As you can see, there is a sub-category that's an object composed by two values, and the other sub-category has the value none.
I want to import the first one as a node with the value 01A, and the other one, I don't want to create any node.
Is this possible, or do you see any other solution?
WITH '14289.json' as filename
CALL apoc.load.json(filename) YIELD value AS v
UNWIND v.categories as categories
WITH apoc.map.clean(categories,[], ['none']) as categories
UNWIND categories.sub_categories as subcategory
RETURN categories.name as category, subcategory.code
Table
Text
Code
╒═════════════╤══════════════════╕
│"category" │"subcategory.code"│
╞═════════════╪══════════════════╡
│"Index Crime"│"01A" │
└─────────────┴──────────────────┘