title: JSON To Model Mapping in Objective-C
body: <p>I am trying to map the JSON I received to a model object in Objective-C.Before I always used ObjectMapper when I coded in swift. I can't seem to grasp the steps I need to go through to achieve the same kind of result when I used ObjectMapper.The problem is when using ObjectMapper you write the code where the mapping happens inside the model class such as;</p>
  
  <p>Ex:</p>
  
  <pre><code>public struct Item: Mappable{
  
  public var name: String?
  public var id: Int?
  public var description: String?
  
  public init?(map: Map) {
  
  }
  
  init(){
  
  }
  
  public mutating func mapping(map: Map) {
  
      name &lt;- map["name"]
      id &lt;- map["id"]
      description &lt;- map["description"]
  }
  } 
  </code></pre>
  
  <p>I understand that I have to write some kind of underlying helper classes to achieve the same kind of functionality but I can't seem to manage because I don't understand the concept at all. I could not find or even if I did,I could not understand how to do it. Please Help. </p>
  
  <p>My model class would look like this in objective-c Im guessing:</p>
  
  <pre><code>@interface BBKProductMetaData : NSObject
  
  @property (nonatomic, strong,nonnull, readonly) NSString *name;
  @property (nonatomic, strong,nonnull, readonly) NSInteger *id;
  @property (nonatomic, assign,nonnull, readonly) NSString *description;
  
  @end
  </code></pre>
  
  <p>What am I supposed to do to map my JSON response to this model.</p>