В приведенном ниже примере я хотел бы выбрать значение вложений , если оно имеет тип «Ожидаемая дата расчетов»?
Я пробовал сделать это следующим образом:
state.form.conditions[[4]].attachments
var state = {
form: {
conditions: [{
exists: '',
attachments: [],
type: 'Finance',
description: '',
status: 'In Progress',
date: ''
}, {
exists: '',
attachments: [],
type: 'Valuation',
description: '',
status: 'In Progress',
date: ''
}, {
exists: '',
attachments: [],
type: 'Inspection',
description: '',
status: 'In Progress',
date: ''
}, {
exists: '',
attachments: [],
type: 'Other Sale',
description: '',
status: 'In Progress',
date: ''
}, {
exists: 'true',
**attachments: [],**
type: 'Anticipated Settlement Date',
description: '',
status: 'In Progress',
date: ''
}],
rejection_reason: '',
},
progress: false,
editable: true,
commercialLease: false,
redirecting: false,
formErrors: { }
};
export { state };