B
B
Brake Made2018-03-25 14:58:50
JavaScript
Brake Made, 2018-03-25 14:58:50

How to make a request with a condition?

Hello everyone :) I have a json file that has a list of employees and they have a certain number of "total" points in json .
How can I make a request so that the page shows 15 people who have the highest total? That is, this request will be default, and will be shown when entering the search page.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Ernest Faizullin, 2018-03-25
@DanilAndreevich

1 You can sort on the back so that there is less work on the front
2 On the front, you can sort the array after the request or make a watcher that will constantly sort the array, such as poductsSorted
useful keys to the question map, orderBy

A
Alexey Shashenkov, 2018-03-25
@teknik2008

lodash.find

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question