Похожие чаты

So let's say I want to sort a bunch of

objects received with fetch on a click event.
Since fetch is async, it'll return a promise. So if I want to sort it on click, I'll need to use the .then and use .sort inside it.

But if I want to .filter() on another button click then does that mean I'll have to fetch it again and do the filter()?

4 ответов

7 просмотров
akza07- Автор вопроса

is there no way to extract the data from the Promise that async function return?

You’ll need to store that data after fetching it

akza07- Автор вопроса
Usma Csce
You’ll need to store that data after fetching it

So just by using fetch and basic js, it's not possible to extract?

Похожие вопросы

Обсуждают сегодня

а зачем этот вопрос для удаления из чата?
Mёdkinson Medvezhkin
48
Кто знает локации, где можно машину красиво отфоткать?
Lalalashechki Lalala
23
Всем привет! Подскажите. Я написал приложение на Delphi 10.2 Tokyo под Windows 10. И передо мной стал вопрос о том чтобы сделать это приложение кроссплатформенным (под Linux и...
Дмитрий Завгородний
24
Привет всем. Подскажите где можно посмотреть, какая версия электрон, поддерживает версии windows? Некий changelog. Мне бы желательно, поддержку 7,8,10... latest, как понимаю и...
Anonym Squad
21
Портфолио: Зовут меня Александр, мне 36 лет. Город Пушкино. Общий рабочий стаж: ~14 лет Уровень квалификации: Senior Full-stack developer Где прочесть мой код? https://github....
Magic
10
Hi, how come such immense selling pressure? -42% for the month. Did I miss some important fundamental change in the company? Looking to buy but it looks like 10c is the next s...
Thom
15
The main vulnerable points of #Monero There is an axiom in computer security that says that a system is as safe as its most vulnerable point. Monero is a #privacy blockchain ...
LiberLion
15
Есть ли смысл устраиваться на 1с ? Даст это плюс в дальнейшем трудоустройстве на php? Просто у меня в городе вакансий на пхп нету. Или лучше удаленно искать. Опыта работы нету...
Azamat
13
hi im a cs student. i need some advice from people who have enough experience in Embedded Software. I need to know whether this profession is suitable for me. I have watched s...
Sahand 🏔️
8
Nothing is pivoting, but merely expanding reach is all. We are bringing in a credible resource that can help outreach in this area that has been mentioned. This does not mean ...
Carl Parker
9
Карта сайта