Вот как вы можете сделать это, используя swift 4-
var array1: [[String: Any]] = [
["name": "obj1Array1", "sort_order": 4, "type": "G"],
["name": "obj2Array1", "sort_order": 1, "type": "G"],
["name": "obj3Array1", "sort_order": 5, "type": "G"]
]
var array2: [[String: Any]] = [
["Group": "M", "sort_order": 3, "type": "G"],
["Group": "C", "sort_order": 2, "type": "G"],
["Group": "D", "sort_order": 6, "type": "G"]
]
let mergedArray = array1 + array2
let sortedAndMerged = mergedArray.sorted{ ($0["sort_order"] as! Int) < ($1["sort_order"] as! Int) }
print(sortedAndMerged)
// prints [["type": "G", "name": "obj2Array1", "sort_order": 1], ["Group": "C", "sort_order": 2, "type": "G"], ["Group": "M", "sort_order": 3, "type": "G"], ["type": "G", "name": "obj1Array1", "sort_order": 4], ["type": "G", "name": "obj3Array1", "sort_order": 5], ["Group": "D", "sort_order": 6, "type": "G"]]