How to sort 1 array in Swift / Xcode and reorder multiple other arrays by the same keys changes

前端 未结 4 1985
北海茫月
北海茫月 2020-12-10 00:01

Sorry for the complex wording of the question. My main experience is with PHP and it has a command called array_multisort. The syntax is below:

bool array_mu         


        
4条回答
  •  猫巷女王i
    2020-12-10 00:41

    I would go with @AntonBronnikov suggestion, and put all your properties into an struct, making an Array of that particular struct and then sorting it.

    This data is clearly related and it's a cleaner approach.

提交回复
热议问题