azure cosmosdb – Cosmos DB Join basics

I am very new to cosmos DB hence a naive question.

[
{“type” : “contacts”,
“firstName”: “ABC”,
“depID” : “123”
},
{“type” : “Departments”,
“ID” : “123”,
“depName” : “cosmosDB”
}
]

I want to query these two and make a result JSON as,
{“type” : “fullbase”,
“firstName”: “ABC”,
“Department” : “123”,
“depName” : “CosmosDB”
}