[ios] How to parse a JSON file in swift?

SwiftJSONParse: Parse JSON like a badass

Dead-simple and easy to read!

Example: get the value "mrap" from nicknames as a String from this JSON response

{
    "other": {
        "nicknames": ["mrap", "Mikee"]
}

It takes your json data NSData as it is, no need to preprocess.

let parser = JSONParser(jsonData)

if let handle = parser.getString("other.nicknames[0]") {
    // that's it!
}

Disclaimer: I made this and I hope it helps everyone. Feel free to improve on it!