Joining two documents in a View

Hi,

I have two document types

case:{
“agentId”: “v781015”,
“dateAssigned”: “2018-10-12T17:57:18.733Z”,
“docType”: “case”,
“ccaiCaseStatus”: “assigned”,
}

user:{
“docType”: “user”,
“agentId”: “v781015”,
“firstName”: “”,
“lastName”: “”,
“aliasName”: “”,
“email”: “”,
“phone”: “”,
“status”: “available|unavailable”
}

I want to join these two documents in a view using map reduce . Basically join the two documents on the field agentId . Can some one else me with this.

Can you elaborate what data you want to emit after the join?