Remove item[i] from jQuery each loop

后端 未结 7 1935
别跟我提以往
别跟我提以往 2020-12-15 03:05

How do I remove an item[i] from items once it reaches in:

$.each(items, function(i) {
    // how to remove this from items
});
7条回答
  •  醉梦人生
    2020-12-15 03:40

    the solution is below:

    _.each(data, function (item, queue) {
        if (somecondition) {
            delete data[queue]
        }
    });
    

提交回复
热议问题