我正在使用apoc.convert.toTree()过程将查询结果转换为树,然后过滤结果以仅获取几个属性。但是,在生成的有效负载中,我得到了两个无法删除的属性_id和_type。
这是我的查询,我应该只获得prefLabel和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;
结果具有标签和id对象:
{
"_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"
},