title: Merge two class objects in IOS
body: <p>I am trying to merge two class objects like the following</p>
  
  <pre><code>Class College{ 
        name,
        collegeName,
        students(Array)
  }
  </code></pre>
  
  <p>I am creating two objects for this class named <strong>objCollegeA</strong> and <strong>objCollegeB</strong>.<br/></p>
  
  <p>If I am assigning the following values for these objects</p>
  
  <pre><code>objCollegeA.name = @"name1"
  objCollegeA.collegeName = @"collegeName2"
  objCollegeA.students = [NSArray arrayWithObjects:@"test1",@"test2",nil];
  </code></pre>
  
  <p>and for second object I am assigning the following values</p>
  
  <pre><code>objCollegeB.name = @"name1"
  objCollegeB.collegeName = @"collegeName2"
  objCollegeB.students = nil;//Here this array is nil
  </code></pre>
  
  <p>Now I need to merge these two objects like the following</p>
  
  <p><code>objCollegeA + objCollegeB =&gt; objCollegeA with Values {@"name1",@"collegeName2", [NSArray arrayWithObjects:@"test1",@"test2",nil];}</code></p>
  
  <p>That means I need to merge the tow objects and replace the nil values with values in the second object and return. Is there any way to do this in objective C?</p>
  
  <p>Thanking you in advance for your reply.</p>