Join with two diffrent keys

I want to join two documents, both documents have a reference of a third document means I want to join with a key that is not meta().id.

comman key in both doc (User,Agent)

 "clients": [
        {
          "id": "1b0a646d"
        }
      ]
select * from data c  join data a
on c.clients.id = a.clients.id
where a.type_=''Agent' and c.type_='User'

it’s not working.
Anyother good way

clients is array. Checkout Example 12, 13 https://blog.couchbase.com/ansi-join-support-n1ql/