I need to implement Edit and Delete option in custom component like this below
Component
<lightning:buttonMenu alternativeText="More options" onselect="{!c.lineAction }" iconSize="small" aura:id="editDelete">
<lightning:menuItem label="Edit" value="1" />
<lightning:menuItem label="Delete" value="2" />
</lightning:buttonMenu>
Controller script
lineAction:function(component, event, helper){
// Here I need to identify whether edit or delete selected and its corresponding values
}