get object data based on force:hasrecordif code example
Example: lightning component get current record id
<aura:component implements="force:lightningQuickAction,force:hasRecordId">
<aura:attribute name="recordId" type="String" />
</aura:component>