I have a use case where I have an array of dictionaries and I need them as a json object:
var data = [Dictionary]() //append items var byt
According to the docs, this should be all you need.
var data = [Dictionary]() //append items var jsonObj = JSON(data) println(jsonObj) println(jsonObj[0])
Are you having a problem with converting an array directly into a JSON object?
JSON