swift sort numbers in array code example Example: swift how to sort array var images : [imageFile] = [] images.sorted(by: { $0.fileID > $1.fileID })