title: NSString is coming nil
body: <p>I am new to iOS. Its my first app in which I am calling <strong>JSON</strong> date from server.
  I have to store coming values in tabkeviewcell, but when I am setting value in NSString it is getting nil.
  Below is my code :-
  .h file</p>
  
  <pre><code>@interface SecondViewController : UIViewController&lt;UITableViewDelegate,UITableViewDataSource,UITextFieldDelegate&gt;
  
  @property (strong, nonatomic) IBOutlet UITableView *tableview;
  @property(strong,nonatomic) NSMutableDictionary *jsonresponse;
  @property(strong, nonatomic) NSMutableArray *jsonresultarr;
  </code></pre>
  
  <p>.m file</p>
  
  <pre><code>- (void)viewDidLoad {
      [self retrievedata];
  
      [super viewDidLoad];
      // Do any additional setup after loading the view.
  }
  
  -(void) retrievedata
  {
      //NSMutableArray *jsonresultarr=[NSMutableArray new];
  
      NSMutableURLRequest *request=[NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://magmasysdev.com/ddc/getAllCompanies.php"]];  // this is your request url
  
      [request setHTTPMethod:@"GET"];
  
      [request setValue:@"application/json;charset=UTF-8" forHTTPHeaderField:@"content-type"];
  
      NSError *err;
      NSURLResponse *response;
      NSData *responseData = [NSURLConnection sendSynchronousRequest:request returningResponse:&amp;response error:&amp;err];
  
      NSArray *jsonArray = [NSJSONSerialization JSONObjectWithData:responseData options: NSJSONReadingMutableContainers error: &amp;err];     // here parsing the array
  
      NSArray *firstArry=[[jsonArray objectAtIndex:1]objectForKey:@"company_data"];
  
      for (int i=0; i&lt;[firstArry count]; i++)
      {
          _jsonresponse= [firstArry objectAtIndex:i];
  
          NSString *Company_Id=[_jsonresponse objectForKey:@"Company_Id"];
          NSString *Company_Name=[_jsonresponse objectForKey:@"Company_Name"];
          NSString *Company_Address=[_jsonresponse objectForKey:@"Company_Address"];
          NSString *Company_Email=[_jsonresponse objectForKey:@"Company_Email"];
          NSString *Company_Tel_Num=[_jsonresponse objectForKey:@"Company_Tel_Num"];
          NSString *Company_Website=[_jsonresponse objectForKey:@"Company_Website"];
          NSString *Company_Fax_Num=[_jsonresponse objectForKey:@"Company_Fax_Num"];
          [_jsonresultarr addObject:Company_Id];
          [_jsonresultarr addObject:Company_Name];
          [_jsonresultarr addObject:Company_Address];
          [_jsonresultarr addObject:Company_Email];
          [_jsonresultarr addObject:Company_Tel_Num];
          [_jsonresultarr addObject:Company_Website];
          [_jsonresultarr addObject:Company_Fax_Num];
  
  
  
  
  
  
  
      }
       [_tableview reloadData];
  
  }
  - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
      if(self.jsonresultarr) // coming nil
      { return _jsonresultarr.count;
  
      }
      return 7;
  }
  </code></pre>
  
  <p>Here is my output response. Can anyone please give me an example or try to modify my code so that I can store data in text boxes.</p>
  
  <pre><code>[{"status":"Y"},{"company_data":[{"Company_Id":"5","Company_Name":"SANTE (PVT) LIMITED","Company_Address":"245\/2-Z P.E.C.H.S Block-6 \nKarachi-75400,Pakistan","Company_Email":"sante@sante.com.pk","Company_Tel_Num":"4520507, 4533425","Company_Website":"www.sante.com.pk","Company_Fax_Num":"4.54885e+006"}
  </code></pre>