【发布时间】:2019-07-07 06:32:09
【问题描述】:
我有一个这样的嵌套对象数组。
这是我的数组:
public collections: ICollections[] = [
{
collectionName: 'Brands',
collectionFields: [
{
columnTitle : 'brandTitle',
Type : dtEnum.string,
control: {
controlTitle: controlsEnum.input,
controlType: controlsEnum.input,
controlProperties:
{
placeholder: 'Enter brand title here ...',
type: 'text',
autocomplete: false,
}
},
columnWidth: 200
}
],
collectionFieldValidation: [{name: 'test'}],
hasPaginator: true,
stickyColumn: 0,
stickyHeader: true
},
{
columnTitle : 'brandURL',
Type : dtEnum.string,
control: {
controlTitle: controlsEnum.input,
controlType: controlsEnum.input,
controlProperties: {
placeHolder: 'Enter Brand URL',
type: 'text',
autocomplete: false,
}
},
columnWidth: 300
},
{
columnTitle : 'brandDescription',
Type : dtEnum.string,
control: {
controlTitle: controlsEnum.textarea,
controlType: controlsEnum.textarea,
controlProperties: {
placeHolder: 'Enter Brand Description',
type: 'text',
autocomplete: false,
}
},
columnWidth: 300
}
];
我想联系placeholder 字段。我如何通过只有具有 Brands 值的 collectionName 字段和具有 brandURL 值的 columnTitle 字段来找到它?
这个问题之前问过collectionName 字段值,但我发现我的过滤器应该包含多个字段。
【问题讨论】:
-
@PrashantPimpale 嗨兄弟,我在我的问题中添加了一些额外的信息。请再看一遍好吗?
标签: arrays angular typescript object