idで2つの配列を比較すると、新しいソートされた配列にマージ:私は結果で並べ替え配列を取得するために「はuserId」によって、この配列をマッピングするにはどうすればよいスウィフト - 私は2列だ
Arr1 = [ ["name": "Player1", "userId": "11", "Score": 9, "picURL": "https://1111"], ["name": "Player2", "userId": "12", "Score": 6, "picURL": "https://2222"], ["name": "Player3", "userId": "13", "Score": 4, "picURL": "https://3333"], ["name": "Player4", "userId": "14", "Score": 8, "picURL": "https://4444"], ["name": "Player5", "userId": "15", "Score": 1, "picURL": "https://5555"] ]
Arr2 = [["userId": "12"], ["userId": "13"], ["userId": "15"]]
を「スコア」このような降順に:
resultArr = [["name": "Player2", "Score": 6, "picURL": "https://2222], ["name": "Player3", "Score": 4, "picURL": "https://3333], ["name": "Player5", "Score": 1, "picURL": "https://5555] ]
それは素晴らしいです!ありがとうございました! – Rurom