Find the right value in an Array, or in an Array of Dictionaries

From time to time I discover a new way of coding something that significantly improves readability & minimizes how much I need to code.  Here’s one of such latest discoveries. Typically to find a value in an array (or in an array of dictionaries) with a specific condition I would do a for loop with …

Sorting Multi Dimensional Array (Swift 3)

Hello all,  This one I’ve found specially useful when working with Core Data fetched arrays.  Let’s say that we want to sort the result of a fetch request based on the value of the field “gold”, we would therefore do the following: let dwarfGoldBags = … //Contains the result of a fetch request with one of the …