问题 I'm using MERN to develop my project, I have tree category with this structure: {id: { type: Number }, parent_id: { type: Number }, name: { type: String }, sub: { type: Boolean }} for example : { "_id": "5dfa22dbb04cee3960868fd8", "id": 1, "name": "Code", "parent_id": 0, "sub": true, "__v": 0 }, { "_id": "5dfa2358b04cee3960868fda", "id": 101, "parent_id": 1, "name": "JavaScript", "sub": true, "__v": 0 }, { "_id": "5dfa68735dc1004134b259ab", "id": 1001, "parent_id": 101, "name": "React", "sub"