嵌套地图尝试创建子树

I have a JSON file which is stored in a nested map. I would like to filter based on one of the intermediate nodes in the tree to create a new nested map to have only the subtree that meets the requirements. My implementation is in go. Any suggestions?