Get total users list along with the active users in mongodb matched on OR condition
问题 Table : user: A, active_1 : "true", active_2 : "false", is_user : "true" user: B, active_1 : "false", active_2 : "true", is_user : "true" user: C, active_1 : "false", active_2 : "false", is_user : "true" Expected Output: { "_id" : null, "total" : 3, "count" : 2 } I need to check either the active_1 or active_2 is true and get the output as like total which indicates the total no.of users which is A,B and C. The count indicates the users who have either active_1 or active_2 is true. It should