A record name is a display value, not a reliable identifier. Filter and sort a copied array, preserve records that share a name and choose a numeric comparison for numbers. Normalize search text only when the requirement calls for that behavior.
Read the supplied records before you change the component. The preview runs your code, so use the controls and inspect the result after more than one action. Some records have a zero value or share a name. Those are deliberate cases, and the hidden records change the values again. Keep the calculation tied to its inputs rather than typing the first expected result into the template. The check accepts a different implementation when it preserves the same visible behavior.
Keep the example's element IDs, classes and control labels so checks can locate the output; your Angular implementation can differ.
Trace the component members into the template, then try the relevant control in the preview.