I'm finding it challenging to implement this in Angular. I have this mapped item:
currentSuper?: any[];
this.currentSuper = response.builder?.superintendents?.filter((x) => x.id ===
this.builderSuperintendentId);
The output of response.builder.superindentents is:
[0:{id:'', firstName: '', lastName:''},
1:{ id: '', firstName:'', lastName:''}]
The issue here is the index number affecting currentSuper, making it look like this:
[0:{id:'', firstName: '', lastName:''}]
<span class="text-secondary">Superintendent:</span><span class="mx-2">{{
order.value.currentSuper?.firstName }} {{ order.value.currentSuper?.lastName }}</span>
Currently, firstName is null and trying order.value.current[0].firstName doesn't work either. How can I ensure that this data renders correctly?