Tagged: Array

There are 14 items tagged #Array.
And there a lots of other tags to explore.

How to Filter an Array in Swift

Swift Array has an instance method, filter(_:), that removes unwanted elements from the resulting array.

How to remove duplicate items from Array in Swift

Learn how to do that using the Swift Algorithms module and without it.

How to Save and Read Array in UserDefaults in Swift

Learn how to store an array in UserDefaults.

How to join an Array of strings into a Single string in Swift

Learn how to turn ["John", "Alice", "Bob"] into "John, Alice, Bob".

How to check if an Element is in an Array in Swift

Learn two ways to check if an array contains a given element.

How to remove nil elements from an array in Swift

Learn how to filter out nil values from a Swift array.

How to get index and value from for loop in Swift

Swift has many ways to retrieve an index of an array, but it might not be obvious. Let's learn how to do it.

Sort array of objects by multiple properties with Swift Tuple

Learn how tuple can help you in sorting.

How to sort by multiple properties in Swift

Learn how to sort an array of objects with multiple criteria.

Different ways to sort an array of strings in Swift

Learn a proper way to sort an array of strings in each circumstance.

How to loop in Swift

Learn different ways of using for loop for each scenario.

How to get the first N elements of array in Swift

Learn a few ways to do it and things you should know when using them.

Decode an array with a corrupted element

When working with an unstable, legacy, or third party API, you might get a malformed object in an array. Learn how to decode a JSON array with corrupted data in Codable safely.

How to split a string into an array of substrings in Swift

Learn different ways to split a string into an array of substrings.

See all tags.