Swift中的多维数组

时间:2015-02-07 03:52:14

标签: swift

我需要在swift中创建一个多维数组,这相当于php:

$thing["field_name"]["und"][0] = "value"

   $thing[field_user_phone] => Array (
      [und] => Array (
         [0] => Array (
           [value] => 9496665555
         )
      )
    )

1 个答案:

答案 0 :(得分:0)

你可以在swift中使用这种方式:

var storage:Dictionary<String,Dictionary<String,Array<String>>> = ["filed_name":["und":["value"]]]

storage["newfield"] = ["test":["aa"]]