title: How to map AfNetworking response object (JSON) to custom class?
body: <p>I'm getting a <em>JSON</em> as response for a <em>POST</em> method using <code>AFNetworking</code>.
  I need to map the <em>JSON</em> to a custom class and the create an object containing values from the <em>JSON</em>.</p>
  
  <p><strong>JSON String</strong></p>
  
  <pre><code>{
  branch =     {
      address = "";
      email = "";
      globalId = 174;
      id = 0;
      mobile = 9846147442;
      name = "Sathish Clininc Branch1";
      netMdId = 132;
      numberOfDevices = 0;
      organisationName = "&lt;null&gt;";
      passPhrase =         (
      );
      phone = 04872279166;
      status = active;
  };
  error = "&lt;null&gt;";
  netmd =     {
      globalId = 132;
      headOfficeAddress = "";
      headOfficeEmail = "sreejith@gmail.com";
      headOfficeMobile = "";
      headOfficeName = Koorkenchery;
      headOfficePhone = "";
      id = 0;
      name = "Sathish Clinic";
      ownerAddress = "";
      ownerEmail = "sreejith@gmail.com";
      ownerFirstName = Sathish;
      ownerLastName = Chandran;
      ownerMobile = "";
      ownerPhone = "";
      password = "aW8oFWDMOJUrIV3l7R7hqQ==";
      status = active;
      userName = sathish;
      userType = owner;
  };
  primary = 1;
  retrieveAppointments =     (
  );
  retrieveDoctorsList =     (
  );
  retrievePatients =     (
  );
  retrieveScheduleList =     (
  );
  success = 1;
  user =     (
  );    }
  </code></pre>
  
  <p><strong>Custom Class</strong></p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  #import "ErrorDTO.h"
  #import "NetMdBranchDTO.h"
  #import "NetMdDTO.h"
  @interface NetMdActivationResponseDTO : NSObject
  @property (nonatomic, strong)ErrorDTO* error;
  @property (nonatomic, assign) BOOL success;
  @property (nonatomic, strong) NetMdBranchDTO* branch;
  @property (nonatomic, strong) NetMdDTO* netmd;
  @property (nonatomic, strong) NSArray* user;
  @property (nonatomic, strong) NSArray* retrieveDoctorsList;
  @property (nonatomic, strong) NSArray* retrievePatients;
  @property (nonatomic, strong) NSArray* retrieveScheduleList;
  @property (nonatomic, strong) NSArray* retrieveAppointments;
  @property (nonatomic, assign) BOOL primary;
  
  @end
  </code></pre>