Field code
{issue.components.id}
Read
Write
Field code
issue?.components?.map(c => c.id)
Components are stored in lists. Documentation on how to work with lists can be found here.
You can access the whole component by issue.components[0]
which returns an object, issue.components
will return a list of objects.