Javascript – Using an outer Boolean variable inside a mongodb aggregation pipe line logical operator $or
I have to check a Boolean flag and base on its condition return different data result. for example I have a collection of books and their prices, normal result of query is prices matching 10, BUT IF showAll flag is…