【发布时间】:2017-02-21 16:52:20
【问题描述】:
给定一个数组
var test = [{a:1, b:2, c:3}, {a:4, b:5, c:6}, {a:7, b:8, c:9}]
如何使用 lodash 获得一组新对象,例如 [{b:2, c:3}, {b:5, c:6}, {b:8, c:9}]?
我试过_.map(test, _pick(???, ['b', 'c'])}
我应该在??? 中输入什么?
【问题讨论】:
标签: javascript underscore.js lodash