{ "title": "hello world", "comments": [
{"id": 1, "text": "text 1"},
{"id": 2, "text": "text 2"},
{"id": 3, "text": "text 3"},
...
], "author": "", "views": 1000,
}假设我现在知道某个 comment 的 id=2,想删除 comments 中 id=2 的字典,也就是 {"id": 2, "text": "text 2"} 这条数据,应该怎样写呢?
冉冉说
相关分类