刪除嵌套數(shù)組中的某一項(xiàng)?
[{ "title": "parent", "expanded": true, "folder": true, "id": "0", "children": [ { "title": "p<愛尬聊_創(chuàng)建詞條>arent[0]", "expanded": true, "folder": true, "id": "1", "children": [ {"title": "Books","id": "2"}, {"title": "Kindle Books","id": "3"}, {"title": "Books For Study","id": "4"}, {"title": "Audiobooks","id":"5"} ] }, { "title": "parent[1]", "id": "6", "folder": true, "children": [ {"title": "Music", "id": "7"}, {"title": "MP3 Downloads", "id": "8"}, {"title": "Musical Instruments & DJ", "id": "9"}, ] } ] }]
想根據(jù)id來刪除數(shù)組中的某一項(xiàng),數(shù)組長度不確定,是嵌套的,知道用遞歸。。但是不會(huì)寫,哪位能幫忙寫下。。
文字交流 23小時(shí)前
</script></body></html>
蓬思菱 23小時(shí)前
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Document</title></head><body> <script type="text/javascript">
就這樣不改變 23小時(shí)前
}];
