0
どうすればソート済みの辞書のようなスウィフトで?Swift:ユニークなキーとそのキーに一致する値のグループを持つ文字列の辞書
配列の値データはランダムです。値の配列が長くなることがあります。
var exampleData = [ [["Section1" : ["11","Green"] ],
[["Section1" : ["23","Blue"] ],
[["Section1" : ["344","Yellow"] ],
[["Section2" : ["100","Tall"] ],
[["Section2" : ["232","Short"] ],
[["Section3" : ["112","Number"] ],
[["Section3" : ["222","String"] ],
var sortedData = [["Section1" : [ ["11","Green"], ["23","Blue"],["344","Yellow"] ]],
["Section2" : [ ["100","Tall"], ["232","Short"] ]],
["Section3" : [ ["112","Number"],["222","String"] ]]]
何を試しましたか?私たちはあなたの実装を見せて、それをより良く理解できるか? – ozgur