title: How to add Nested arrays to my model class
body: <p>I get the below response from the API. I need to model the response into classes in swift 3.
  The Api Response in JSON is as below:</p>
  
  <pre><code>{
    "data": [
      {
        "CategoryName": "אהבה",
        "CategoryID": "61",
        "CategoryDate": "2016-08-26 02:11:43",
        "CategoryImage": "love.png",
        "SubCategoryArray": [
          {
            "SubCategoryName": "אהבה",
            "SubCategoryRefID": "61",
            "SubCategoryID": "115",
            "SubCategoryDate": "2016-08-29 09:25:56",
            "TextArray": [
              {
                "TextID": "103",
                "Text": "&lt;p dir=\"rtl\"&gt;&lt;span style=\"font-size:48px\"&gt;&lt;strong&gt;אוהב&lt;/strong&gt; אותך כל כך&lt;/span&gt;&lt;/p&gt;\r\n"
              },
  </code></pre>
  
  <p>How can I model the subCategory and TextArray subclasses.</p>
  
  <p>I am using SwiftyJSON to populate my model class</p>
  
  <p>My model classes are as shown below;</p>
  
  <pre><code>class Menu
  {
      var CategoryName: String?
      var CategoryID: String?
      var CategoryDate: String?
      var CategoryImage: String?
      var SubCategoryArray: [SubCategoryArray]?
  
      init(CategoryName: String?, CategoryID: String?, CategoryDate: String?, CategoryImage: String?, SubCategoryArray: [SubCategoryArray]?) {
          self.CategoryName = CategoryName
          self.CategoryID = CategoryID
          self.CategoryDate = CategoryDate
          self.CategoryImage = CategoryImage
          self.SubCategoryArray = SubCategoryArray
      }
  }
  
  
  class SubCategoryArray
  {
      var SubCategoryName: String?
      var SubCategoryRefID: String?
      var SubCategoryID: String?
      var SubCategoryDate: String?
      var TextArray : [TextArray]?
      init(SubCategoryName: String?, SubCategoryRefID: String?, SubCategoryID: String?, SubCategoryDate: String?, TextArray: [TextArray]?) {
          self.SubCategoryName = SubCategoryName
          self.SubCategoryRefID = SubCategoryRefID
          self.SubCategoryID = SubCategoryID
          self.SubCategoryDate = SubCategoryDate
          self.TextArray = TextArray
      }
  }
  
  
  class TextArray
  {
      var TextID: String?
      var Text: String?
  
      init (TextID:String? , Text: String? )
      {
          self.TextID = TextID
          self.Text = Text
      }
  }
  </code></pre>
  
  <p>I am storing it as </p>
  
  <pre><code>if let json = try? JSON(result){
  var menus = [Menu]()                    
  for (_, content) in json["data"] {
  let menu = Menu(CategoryName: (content["CategoryName"].string),
   CategoryID: content["CategoryID"].string,
   CategoryDate: content["CategoryDate"].string,
   CategoryImage: content["CategoryImage"],
   SubCategoryArray: content["SubCategoryArray"].string)
   menus.append(menu)
   }
  </code></pre>
  
  <p>The only issue is how to do it for the <code>SubCategory</code> class and <code>TextArray</code> class.</p>