title: IOS: Dictionary Return null value/Data
body: <p>in my project i am using JSON parsing to display data for this i created 2 NSDictionary dictionary 1 return success response but when i call it in second dictionary it return Null value.
  i am sharing my code please help me to correct it</p>
  
  <pre><code>-(void)hdata
  {
  
  
  
      NSString *post = [NSString stringWithFormat:@"data[Users][ref_id]=%@&amp;api_key=bf45c093e542f057c123ae7d6",refidstr];
      NSData *postData = [post dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];
  
      NSString *postLength = [NSString stringWithFormat:@"%lu", (unsigned long)[postData length]];
  
      NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];
      [request setURL:[NSURL URLWithString:@"http://192.168.0.20/hspCh/api/user_diagnose_list"]];
  
      [request setHTTPMethod:@"POST"];
      [request setValue:postLength forHTTPHeaderField:@"Content-Length"];
      [request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
      [request setHTTPBody:postData];
  
      NSURLResponse *response;
      NSError *err;
      NSData *responseData = [NSURLConnection sendSynchronousRequest:request returningResponse:&amp;response error:&amp;err];
  
      [request setHTTPBody:postData];
  
      NSString *str=[[NSString alloc]initWithData:responseData encoding:NSUTF8StringEncoding];
      NSLog(@"str : %@",str);
  
  
  
      NSDictionary *dict6 = [self cleanJsonToObject:responseData];
      NSLog(@"str : %@",dict6);    &lt;=======it gives correct responce
  
  
  
      diagnosisdict = [dict6 objectForKey:@"data[Users][ref_id]"];
  
      [diagnosisdict setValue:refidstr forKey:@"data[Users][ref_id]"];
      NSLog(@" for ref id =%@ ,  data is= %@",refidstr, diagnosisdict);  &lt;======Gives null responce
  
  }
  </code></pre>
  
  <p>Output of the above in console is as follows</p>
  
  <pre><code>2015-12-09 10:34:16.935 HcH[2841:32315] str : {"response":200,"diagnoses":[{"DiagnosesHospitals":{"hospital_id":"3341","id":"163075","discharges":"100.00","charge_amt":"1200.00","total_amt":"1500.00","medicare_amt":"1200.00"},"Diagnoses":{"diagnosis_name":"TRANSIENT ISCHEMIA"}}]}
  2015-12-09 10:34:16.935 HcH[2841:32315] str : {
      diagnoses =     (
                  {
              Diagnoses =             {
                  "diagnosis_name" = "TRANSIENT ISCHEMIA";
              };
              DiagnosesHospitals =             {
                  "charge_amt" = "1200.00";
                  discharges = "100.00";
                  "hospital_id" = 3341;
                  id = 163075;
                  "medicare_amt" = "1200.00";
                  "total_amt" = "1500.00";
              };
          }
      );
      response = 200;
  }
  2015-12-09 10:34:16.936 HcH[2841:32315]  for ref id =3341 ,  data is= (null)
  </code></pre>