Похожие чаты

I am trying to delete object based on key is

there any better way I can achieve this?
https://bin.mkr.pw/~5f8f276f1b923e285d89c8bc

11 ответов

17 просмотров

What you mean by delete object? Just use Array#filter

decoder- Автор вопроса
Darvesh 🍀
What you mean by delete object? Just use Array#fil...

Sorry I mean children will move above for example I have object like { title: "a", id: "a", children: [ { title: "ab", children: [], id: "ab", }, { title: "ac", children: [ { title: "acc", children: [], id: "acc", }, ], id: "ac", }, ], }; and If I want to remove object id 'ac' then expected output will be { title: "a", id: "a", children: [ { title: "ab", children: [], id: "ab", }, { title: "acc", children: [], id: "acc", }, ], };

decoder
Sorry I mean children will move above for example ...

If you want to remove a then the children will move up?

From what I see, you just wanna remove duplicate entries

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

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

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта