I have documents where I have a map field of teacher containing uid and username and in that same document I have a array field of students that contains the student id's now I want to query documents based on both field how can I merge the code below
var teacherRef = db.collection('classes')
.where("teacher.id", "==", localStorage.getItem("user"))
var studentRef = db.collection('classes')
.where("students", "array-contains", localStorage.getItem("user"))