I'm looking for a quick way to map a a 2-dim array to JSON. I'm using SwiftyJSON and have hit a brick wall (I'm a hardware guy lol). Thank you!
import UIKit
import SwiftyJSON
var myPlaceArray = [Int:[String: Any]]()
myPlaceArray[0] = [
"lat" : "2.590",
"long" : "170.9"
]
myPlaceArray[1] = [
"lat" : "42.90",
"long" : "70.9"
]
//I can do this
let json = JSON(myPlaceArray[1]!)
print(json)
//but I cant do this
let jsonIndexed = JSON(myPlaceArray)
print(jsonIndexed[0] )