Hi
this code is
CALL apoc.load.xml ($mirror_filelocation, '')
YIELD value
UNWIND value._children AS plmxml
with plmxml
where plmxml._type = "ProductView"
with plmxml
return plmxml
returning a json like this. I want to return a map of all attributes except under _children dynamically without mentioning the name of attributes in my cypher.
i want to return
{
"primaryOccurrenceRef": "id10",
"_type": "ProductView",
"id": "id4",
"ruleRefs": "#id2",
"rootRefs": "id7"
}
how can i do it ?
the retuned json from above stmt is in below.
Thanks
{
"_children": [
{
"_type": "ApplicationRef",
"label": "xDVplLIJqd$DyB/QkqRC5OMJ6JDmB/AAAAAAAAAAAAAA/BOM/"
},
{
"_type": "UserData",
"_children": [
{
"_type": "UserValue",
"title": "BOM_precision_type",
"value": "imprecise"
}
],
"primaryOccurrenceRef": "id10",
"_type": "ProductView",
"id": "id4",
"ruleRefs": "#id2",
"rootRefs": "id7"
}