Joins using N1ql

Hi

How to join two documents in couchbase using N1ql Query ??
The primary key of second document is known.

ANSI JOINS in 5.5 https://blog.couchbase.com/ansi-join-support-n1ql/

Thanks for the reference.But while joining what is “KEYS” ? I am stucked here. any suggestion??

A JOIN B ON KEYS A.f1

A.f1 expression that should point to document key in B
A.f1 can be single value (each left document joins one right side document) or Array of Values (each left side document joins n number of right side documents).

https://developer.couchbase.com/documentation/server/current/n1ql/n1ql-language-reference/from.html

Also checkout JOIN Faster With Couchbase Index JOINs