2.0 is here!!
Nested values
value <-- json["nested.nested.nested.nestedValue"]
Object at index
value <-- json[12]
Combine both
value <-- json[1]?["someKey"]?[2]?["something.other"]
Looping on Array
if let collection = json.collection {
for jsonEntry in collection {
//Do something
}
}
Custom Date format
createdAt <-- json["created_at"]?.dateFormat("yyyy-MM-dd'T'HH:mm:ssZZZZZ")