【发布时间】:2017-11-03 05:03:15
【问题描述】:
我有一个这样的数组
我想按属性名称选择数组项,为此我使用 lodash:
const result = _.map(this.thing, _.property('groups')).filter(x => x !== undefined);
但我得到了数组数组作为结果
我需要的只是单个选定的属性数组。
知道如何实现吗?
【问题讨论】:
-
为什么要摆脱proto?
标签: javascript arrays typescript