Your first model will represent outer array. And second will represent inner array. Here is a sample
import Foundation
import ObjectMapper
// RecipientModel is an array itself
class RecipientModel: Mappable {
var filingStatusId:Int
var orderId: Int
var formName: String
var recipientList: [RecipientList]
required init?(_ map: Map) {
filingStatusId = 0
orderId = 0
formName = ""
recipientList = []
}
func mapping(map: Map) {
filingStatusId <- map["FilingStatusId"]
orderId <- map["OrderId"]
formName <- map["FormName"]
recipientList <- map["RecipientList"]
}
}
And now you will create another model for your RecipientList
class RecipientList: Mappable {
var filingStatusId:Int
var formId: Int
var formName: String
required init?(_ map: Map) {
filingStatusId = 0
formId = 0
formName = ""
}
func mapping(map: Map) {
filingStatusId <- map["FilingStatusId"]
formId <- map["FormId"]
formName <- map["FormName"]
}
}