登录
注册
node.js 学习社区
查找json数据中的任意一个节点的所有父节点?例如查找下面json中Text_1 所有的父节点

267211681

2020-06-11 20:20

{"Children":{"AbstractNodeData":[{"$":{"Name":"Panel_11","Tag":"197"}},{"$":{"Name":"back","Tag":"211"},"Children":{"AbstractNodeData":[{"$":{"Name":"red_0","Tag":"212"},"Children":{"AbstractNodeData":[{"$":{"Name":"btn_","Tag":"213"},"Children":{"AbstractNodeData":{"$":{"Name":"Sprite_1","Tag":"214"}}}},{"$":{"Name":"btn_x","Tag":"215"}}]}},{"$":{"Name":"red_1","Tag":"216"},"Children":{"AbstractNodeData":[{"$":{"Name":"btn_x","Tag":"219"}},{"$":{"Name":"Text_25","Tag":"220"}},{"$":{"Name":"Text_2","Tag":"117"}},{"$":{"Name":"btn_x_0","Tag":"222"}},{"$":{"Name":"btn_x_1","Tag":"115"},"Children":{"AbstractNodeData":{"$":{"Name":"Text_1","Tag":"116"}}}},{"$":{"Name":"btn_x_2","Tag":"116"}}]}}]}}]}}

回复 · 0

发表回复

你可以在回复中 @ 其他人