问题
I'm converting the result of my query to a tree using the apoc.convert.toTree() procedure and then I filter the result to get only couple properties. However, in the resulting payload I get two properties _id and _type that I'm unable to remove.
this is my query where I' supposed to get only prefLabel and uri:
MATCH p=(n {uri:'https://enterprise.poolparty.biz/Taxo_test/11325'})-[:narrower*]->(m)
WHERE NOT ()-[:narrower]->(n)
WITH COLLECT(p) AS ps
call apoc.convert.toTree(ps, true, { nodes: {CategoryNode: ['prefLabel', 'uri']} }) yield value
RETURN value;
the result has the label and an id object:
{
"_type": "CategoryNode",
"narrower": [{
"_type": "CategoryNode",
"narrower": [
{
"_type": "CategoryNode",
"_id": {
"low": 2530,
"high": 0
},
"uri": "https://enterprise.poolparty.biz/Taxo_test/13594",
"prefLabel": "Haie artificielle"
}
],
"_id": {
"low": 2528,
"high": 0
},
"uri": "https://enterprise.poolparty.biz/Taxo_test/11325",
"prefLabel": "Occultation plastique"
},
来源:https://stackoverflow.com/questions/56288402/is-there-a-way-to-remove-id-type-from-cypher-result