I have an array which has two types of objects: Awarded and non-awarded. I simply want to sort my array so that awarded objects are placed first, and the rest are placed afterwards.
Here is the code that defines the key "awarded":
if let awarded = achievements[indexPath.row].userRelation["awarded"] as? String where awarded != "<null>" { }
Within those brackets I'd like to use my unwrapped value "awarded" to sort through the achievements and add those to the beginning, and the rest at the end.
How would I go about doing that?
achievementhere? Is it an object, which contains auserRelationdictionary <String, String>? Kind of a strange entity model :/