how to use foreign key in mongodb
No, mongo dB doesn't support foreign key, primary key relationship.
Mongodb is not build on ACID properties but CAP theorem.
Also mongodb encourages to put relevant data into single collection rather than putting into multiple collections and then map those multiple collections by foreign key relationships.