How sort objects according to value from select element?- mongodb, nodejs
I have to sort objects according to value from select option. How I should do this? //This is my select element in another file <select class="form-select" aria-label="Default select example"> <option id="sorting" selected>Sort by</option> <option value="1">Low to High price</option> <option value="2">High…