-2
刪除對象我有對象的數組:如何從一個陣列基於給定屬性
[
{ content: "lelzz", post_id: "241" },
{ content: "zzyzz", post_id: "242" },
{ content: "abcde", post_id: "242" },
{ content: "12345", post_id: "242" },
{ content: "nomno", post_id: "243" }
]
如何刪除與'242'
一個post_id
所有對象?
以下是一些在javascript中從數組中刪除元素的方法:http://stackoverflow.com/questions/10024866/remove-object-from-array-using-javascript – rob