Is there a way to remove _id _type from cypher result

梦想与她 提交于 2020-01-04 05:54:29

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!