title: IOS Compare two array and get Result
body: <p>I have below JSON Format:</p>
  
  <pre><code> {
    "Get_your_story_answer": [
      {
        "st_id": "19",
        "story_title": "Newone",
        "user_fb_id": "1649424812005217",
        "winner_fb_id": "1685417121693688",
        "winner_fb_id2": "",
        "winner_fb_id3": "",
        "story": "\ud83d\ude33\ud83d\ude25\ud83d\ude14\ud83d\ude0c",
        "status": "1",
        "s_created_date": "2016-01-18 23:06:05",
        "reply_answer": [
          {
            "l_id": "42",
            "story_id": "19",
            "user_fb_id": "1649424812005217",
            "selected_user_fb_id": "1685417121693688",
            "answer": "hahaha",
            "l_rating": "0",
            "status": "1",
            "l_created_date": "2016-01-18 23:10:51",
            "l_new_created_date": "2016-01-19 11:40:51",
            "winner": "1",
            "answer_user_id": "3",
            "answer_fb_id": "1685417121693688",
            "answer_user_name": "Kin Patty"
          },
          {
            "l_id": "43",
            "story_id": "19",
            "user_fb_id": "1649424812005217",
            "selected_user_fb_id": "1498304680499454",
            "answer": "",
            "l_rating": "0",
            "status": "1",
            "l_created_date": "2016-01-18 23:06:05",
            "l_new_created_date": "2016-01-19 11:36:05",
            "winner": "0",
            "answer_user_id": "10",
            "answer_fb_id": "1498304680499454",
            "answer_user_name": "John Kingman"
          }
        ]
      }
    ],
    "status": "1",
    "msg": "Get data"
  }
  </code></pre>
  
  <p>Now I have to get Winner id </p>
  
  <p><strong>for Example</strong> <code>"winner_fb_id"</code> from  <code>[Get_your_story_answer]</code> and compare it with <code>[reply_answer]</code>.</p>
  
  <p>If <code>[reply_answer]</code> contain <code>"winner_fb_id"</code> then I have to take only that name as winner . 
  Like in my Example , <strong>"Kin Patty"</strong></p>
  
  <p>I have tried this ,</p>
  
  <p>//_getwind is mutable array</p>
  
  <pre><code>  _getwinnerid =[NSMutableArray new];
   _getwinnerid=[[_dataDictionary  valueForKey:@"Get_your_story_answer"]valueForKey:@"winner_fb_id"];
  </code></pre>
  
  <p>Here is _getwinnerid output</p>
  
  <blockquote>
    <p>&lt;__NSArrayI 0x7ffb5a57c7b0>(
    1685417121693688</p>
  </blockquote>
  
  <pre><code>   NSArray *replaydata=[[_dataDictionary  valueForKey:@"Get_your_story_answer"]valueForKey:@"reply_answer"];
  </code></pre>
  
  <p>Here is Replay Data Result</p>
  
  <p><a href="https://i.stack.imgur.com/FWbxL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FWbxL.png" alt="enter image description here"></a></p>
  
  <pre><code>if (![replaydata containsObject:_getwinnerid]) {
      NSLog(@"data");
  }
  </code></pre>
  
  <p><strong>Note:-</strong> Winner Id will be multiple. so, I have to compare 2 or more winner id and then take name from replay data response. And then I have to set name of winner in UITableview.</p>