【发布时间】:2015-03-25 20:30:56
【问题描述】:
问题是如何对具有以下结构的数组进行排序:
status =
[["Wartend", :pending],
["Schufa Check", :schufa_check],
["Schufa Key existiert", :schufa_person_key_exists],
["LottoIdent", :lotto_ident],
["IBAN existiert", :iban_exists],
["E-Mail Bestätigung", :email_validation],
["SMS Bestätigung", :mobile_validation],
["Aktiv", :active],
["gesperrt", :locked],
["ausgeschlossen", :locked_out],
["werden gelöscht", :marked_for_deletion]]
结果应该是这样的:
[["Aktiv", :active],
["ausgeschlossen", :locked_out],
["E-Mail Bestätigung", :email_validation],
["gesperrt", :locked],
["IBAN existiert", :iban_exists],
["LottoIdent", :lotto_ident],
["Schufa Check", :schufa_check],
["Schufa Key existiert", :schufa_person_key_exists],
["SMS Bestätigung", :mobile_validation],
["Wartend", :pending],
["werden gelöscht", :marked_for_deletion]]
【问题讨论】: