lets explore ways to reduce this with functional programing,
const getInputCriteria = (data, criteriaLocation: { fieldSetsIndex, inputIndex }) => {
...
return value
}
// getInputCriteria(data[<sectionIndex>], criteriaLocation: { fieldSetsIndex, inputIndex });
const data = EN_DOLO_MOCK_DATA.data.lifeEventForm.sectionsEligibilityCriteria
const relationshipCriteria = getInputCriteria(data[0], criteriaLocation: {
fieldSetsIndex: 1,
inputIndex: 0,
})
// And then when we want to call dot notations we can call it from the criteria, ie.
console.log(relationshipCriteria.id);
console.log(relationshipCriteria.values[1].value);
Description
we have lengthy dot notation assignments due to nested data,
for example:
current
lets explore ways to reduce this with functional programing,
User Story
No response
Acceptance Criteria
No response