如何从Lodash中的对象集合中获取匹配值?

时间:2018-02-26 12:09:17

标签: angular lodash angular-forms

private static getControlName(c: AbstractControl): string | null {
    const formGroup = c.parent.controls;

    return Object.keys(formGroup).find(name => c === formGroup[name]) || null;
}

Lodash的上述退货声明相当于什么?我尝试使用.find和.pickBy(以及其他一些),但似乎都返回了一个对象而不是值。

0 个答案:

没有答案