Created
March 30, 2016 03:56
-
-
Save DisappearPing/4ed645667558a999977e4fd67b7e5de0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//產出用zip為key找 縣市/鄉鎮市區 | |
println(zipJson?.dictionaryValue.keys.array) | |
println(zipJson?.dictionaryValue.values.array) | |
for var i = 0; i < zipJson?.dictionaryValue.keys.array.count ; i++ { | |
let first = zipJson?.dictionaryValue.keys.array[i] | |
let second = zipJson?.dictionaryValue.values.array[i] | |
let third = zipJson?.dictionaryValue.values.array[i].dictionaryValue | |
for var j = 0; j < zipJson?.dictionaryValue.values.array[i].dictionaryValue.count ; j++ { | |
let key = zipJson?.dictionaryValue.values.array[i].dictionaryValue.keys.array[j] | |
let value = zipJson?.dictionaryValue.values.array[i].dictionaryValue.values.array[j] | |
println("\(key) : \(value)") | |
println("\(value) : \(key) - \(first)") | |
zipToString.updateValue([key!,first!], forKey: value!.stringValue) | |
} | |
} | |
println(zipToString) | |
let json = JSON(zipToString) | |
println(json) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment