Using jQuery inArray with array of JavaScript Objects

前端 未结 5 1280
终归单人心
终归单人心 2020-12-01 12:49

I\'m working with an array of JavaScript Objects as such:

var IssuesArray = [{\"ID\" : \"1\", \"Name\" : \"Issue1\"}, 
                   {\"ID\" : \"2\", \"         


        
5条回答
  •  鱼传尺愫
    2020-12-01 13:19

    n is your list item, so something like this should do the job:

    $.grep(issuesArray, function(n) { return n.ID != "2"; })
    

提交回复
热议问题