JS inner join match single row?

I'm trying to inner join a parent which will always be a single value but it represents an array, is there an easy way to return a single value? here's the match currently, children will be fine as an array but the parent will always be singular.
    const match = `
      *, 
      children:contact_and_type!parent_id(
        id,
        type, 
        contact:child_id(id, full_name, profile_image)
      ),
      parent:contact_and_type!child_id(
        id,
        type,
        contact:parent_id(id, full_name, profile_image)
      )`


I currently just get the first value but I don't really like this approach:
contact.parent = contact.parent[0]
Was this page helpful?