issue?.links[0]?.inwardIssue?.key
Links are stored in lists. Documentation on how to work with lists can be found here.
You can access the whole inward issue by issue?.links[0].inwardIssue which returns an Issue object, issue?.links will return a list of objects.
issue?.links[0].inwardIssue
issue?.links