How to parse the json data using swiftJson along with Alamofire
<p>my Json data sample. this is only a sample of data .Likewise so much data available like number of subcategory is 22. number of items are different according to subcategory.Also number of rows are 15 in which the first name is Pizza.</p>

<pre><code>[
 {
  "id": "244",
  "name": "PIZZAS",
  "image": "",
  "coupon": "1",
  "icon": "",
  "order": "1",
  "aname": "",
  "options": "2",
  "subcategory": [
              {
                "id": "515",
                "name": "MARGARITA",
                "description": "Cheese and Tomato",
                "image": "",
                "icon": "",
                "coupon": "1",
                "order": "1",
                "aname": "",
                "options": "2",
                "item": [
                            {
                               "id": "1749",
                               "name": "9 Inch Thin &amp; Crispy Margarita",
                               "description": "",
                               "price": "3.40",
                               "coupon": "1",
                               "image": "",
                               "options": "2",
                               "order": "1",
                               "addon": "495",
                               "aname": "",
                               "icon": ""
                        }]
          }]
  }]
</code></pre>

<p><a href="https://i.stack.imgur.com/t0Fxl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/t0Fxl.png" alt="enter image description here"></a> <a href="https://i.stack.imgur.com/lFO2l.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lFO2l.png" alt="enter image description here"></a></p>

<p>I want to fetch the all name, all subcategory name, all item name and all item description into particular array so that i can populate particularly into different tableview</p>

<pre><code>func ParseJSON(){
     var MenuList = [Menu]()

    Alamofire.request(.GET, myUrl)
        .validate()
        .responseJSON { response in
            switch response.result
            {
            case .Success:
                if let value = response.result.value {
                    let json = JSON(value)
                     print("JSON: \(json)")
                      for entity in json{
                        print(entity)
                       MenuList.append(entity["name"])  ///error
                    }

                }
            case .Failure(let error):
                print(error)
            }
    }

}
</code></pre>

<p>I am able to fetch the response using Alamofire. Now How to implement it using swiftJson ??</p>

<p><strong>Updated</strong></p>

<p>I have added the class model for main category, subcategory and items.</p>

<pre><code>    import UIKit
    class Menu {
                 var id: Int?
                 var name: String?
                 var image: UIImage?
                 var coupon: Int?
                 var icon: UIImage?
                 var order: Int?
                 var aname: Int?
                 var options: Int?

init(id:Int,name:String,image:UIImage,coupon:Int,icon:UIImage,order:Int,aname:Int,options:Int){
        self.id = id
        self.name = name
        self.image = image
        self.coupon = coupon
        self.icon = icon
        self.order = order
        self.aname = aname
        self.options = options


    }
   }
</code></pre>

<p>how to pass the data to the class  and get the value</p>