title: How to parsed all the data in JSON?
body: <p><strong>First issue I addressed</strong>  </p>
  
  <p>I am working on an APIService using Alamofire, I tried to print the <code>response</code> and the I got the data successfully, but unfortunately the data from JSON turns to <strong>nil</strong> when I parse it to the <code>attendees</code> Object. How can I reflect the data from json to the <strong>attendees</strong> object? </p>
  
  <p><strong>Second Issue</strong> </p>
  
  <p>I solved the 1st issue, after all the debugging I had. The codes  I used was written in my answer below. I parsed data from JSON going to <code>attendees</code> but as I checked only the first array was fetch. How can I get all the data inside the JSON? Hope you can help me. Thank you.</p>
  
  <pre><code>func getParticipants(passcode: String,
                   participantType: ParticipantType,
                   successBlock: @escaping (Attendees?) -&gt; Void,
                   failureBlock: @escaping (Error) -&gt; Void)
  {
  let attendeesURL = URL(string: "\(GET_PARTICIPANTS_URL)/\(passcode)/\(participantType)")
  
  Alamofire.request(attendeesURL!, method: .get).responseJSON { (response) in
      print(response)
  
      if let error = response.error
      {
          failureBlock(error)
          return
      }
  
      if let attendeeJSON = response.result.value as? [Dictionary&lt;String, Any&gt;],
          let attendeeObj = attendeeJSON.first {
          print(attendeeObj)
          let attendees = Attendees.init(JSON: attendeeObj)
          successBlock(attendees)
          }
        }
     }
  
  }
  </code></pre>
  
  <p><strong>JSON</strong></p>
  
  <pre><code>[
  {
  "event_name": "Laugh Trip",
  "event_participants": [
      {
          "participant_id": "6f1e7fd5-6da9-4d5b-bc91-4771aeaa5235",
          "employee_number": "",
          "last_name": "name",
          "first_name": "name",
          "middle_name": "",
          "display_name": "name, name ",
          "department_name": "IT",
          "position_name": "Application Developer",
          "registered_flag": true,
          "registered_datetime": "2018-07-16T14:51:57.813",
          "registration_type": 1,
          "delete_flag": false,
          "manual_reg_flag": false,
          "out_flag": true,
          "out_datetime": "2018-07-16T14:54:00.000",
          "classification": 1,
          "others": ""
      },
   {
          "participant_id": "6f1e7fd5-6da9-4d5b-bc91-4771aeaa5235",
          "employee_number": "",
          "last_name": "name",
          "first_name": "name",
          "middle_name": "",
          "display_name": "name, name ",
          "department_name": "IT",
          "position_name": "Application Developer",
          "registered_flag": true,
          "registered_datetime": "2018-07-16T14:51:57.813",
          "registration_type": 1,
          "delete_flag": false,
          "manual_reg_flag": false,
          "out_flag": true,
          "out_datetime": "2018-07-16T14:54:00.000",
          "classification": 1,
          "others": ""
      },
    ]
  ]
  </code></pre>