please can you tell me how to sort (descending, ascending) multiple arrays of "BonusCard" in "bonusCardsArray" on the basis of its "currentPoints" values.
//Array to sort according to "currentPoints"
var bonusCardsArray = [BonusCard]()
//basis class
class BonusCard {
var companyName : String
var bonusCardDescription : String
var currentPoints : Int
var bonusCardType : Int
init(companyName: String, bonusCardDescription: String,
currentPoints: Int, bonusCardType: Int) {
self.companyName = companyName
self.bonusCardDescription = bonusCardDescription
self.currentPoints = currentPoints
self.bonusCardType = bonusCardType
}
}