My ask is quite simple here, i have a lightning component where i have an attribute of type Array of Account (Account[]). This array already has a list of Account records. At a certain event (on click of a button), i need to find the account record from the array, corresponding to a record id that i have.
I tried to find a JS method to do so, but couldn’t. Any help here would be appreciated.
Component:
<aura:attribute name="studentsList" type="Account[]" default="{}"/>