Node.js jsonPath排除字段

Node.js jsonPath排除字段,node.js,jsonpath,Node.js,Jsonpath,我想要得到整个对象,不包括模板字段,无论级别如何。 这是我的目标: { sections: [ { name: "part1", title: "Part I", template: "Part I template", children: [{ name: "1",

我想要得到整个对象,不包括
模板
字段,无论级别如何。 这是我的目标:

{
            sections:
       [
            {
                name: "part1",
                title: "Part I",
                template: "Part I template",
                children: [{
                    name: "1",
                    title: "part1.1",
                    template:"part1.1 template"
                }, {
                    name: "2",
                    title: "part1.2",
                    template:"part1.2 template"
                }]
            },
        {
            name:"part2",
                //...
        }
    ]
 }

我试过了,但我不知道该怎么做。

如果你想,你可以简单地使用递归方法而不是使用jsonpath如果你想,你可以简单地使用递归方法而不是使用jsonpath