【发布时间】:2013-10-08 11:57:42
【问题描述】:
我有以下问题。我想根据 fruits 数组过滤这个 fruitsCollection。 我想得到的结果是,例如:
filteredFruits1 [ all fruits with the
exception of those which are in
fruitsToCut array
]
例子:
var fruitsToCut = [ 'egzotic', 'other'],
fruitsCollection = [ {name: papaya, type: 'egzotic'},
{name: orange, type: 'citrus'},
{name: lemon, type: 'citrus'}
]
也许是一些下划线功能?
【问题讨论】:
标签: javascript arrays collections underscore.js