Sort, Filter, and Map data arrays in Swift | Continued Learning #13

preview_player
Показать описание
Being able to effectively manipulate data in your application is extremely important. Before displaying content on the screen, you will (almost always) want to organize the data to show specific pieces of content. In order to do this, we will learn how to use 3 super-efficient modifiers that Apple provides us with:

1. Sort - organize data by criteria
2. Filter - create a subset of your data
3. Map - transform data from one type to another

As you can imagine, being able to sort, filter, or map data is used ALL the time in production applications. We will learn how to implement these methods and also learn some fancy ways to shorten the code to look like professional developers ;)

🤙 WELCOME BACK 🤙

Рекомендации по теме
Комментарии
Автор

GOD OF SWIFTUI, NO MORE WORDS NEEDED!

denaktepe
Автор

Such a world class video. Very well explained and detailed. You are the best! Thank you for such a wonderful video

bbulliard
Автор

14:35 can be reduced even more to:
dataArray.sorted { $0.points > $1.points }

17:50
filteredArray = dataArray.filter { $0.isVerified }

22:30
filteredArray = dataArray.map { $0.name }

pasha
Автор

please do not stop, all love from egypt

mustafasabahy
Автор

The video editing goes crazy on this one

offthedeepend
Автор

loved it, back in the day, with Digital Basic, I use to do Bubble Sort on massive arrays, if I remember you sorted from top and bottom toward the middle,

dugrut
Автор

Have seen $0 or $1 in lots of Swift code. Understand the outcome but still don't get the background/rational to it. Would love a video just on that topic.

mystride
Автор

Very good video. Not only for sort, map and filter but also MVVM. Thank you very much. Liked and subscribed.

benceylan
Автор

I have not seen the advanced playlist, but I really hope you'll tell us how to combine those filters through user interface. it's like when user chooses which filters they want to use.

saweekmusic
Автор

Thanks a lot Nick! Excellent video as always!

bobbynwm
Автор

So I’m filtering an array of date from fire base. For some reason I’m getting 180% cpu usage then when I comment out my filter function it’s 0.
What am I missing here

itsericbruh
Автор

thanks, cool the music during updating

mig
Автор

Awesome explanation!!! 🥳 As always thank you so much!!!

andresraigoza
Автор

what a video men. I realize i learn something else

Bugra_ciftci
Автор

18:25 how did you fold it into a single line?

lolrie
Автор

Thank you for the great video! Liked and subscribed.❤️❤️❤️

yellowhero
Автор

assuming im using firebase db with an object filed that is null,
then best practice is to map it with compact map ?

moshikof
Автор

That was good brother
Appreciate the vid

jonothen
Автор

Nick, what if we were having two String variables in the struct ( name and representative for eg ) or more? How would we be able to filter by either name or representative hence filter accepts only one Bool condition ? Is there another way to go about it ? ( working on implementing a list with searchable for a struct model that has multiple string variables, and I want to allow the option to filter by multiple string values not only one ).

bobbynwm
Автор

Do you have a video where the array of names is imported from a separate .txt file or.cover file?

GabeColors