title: How can i fetch value from Json response in Objective -C
body: <p>I have a problem with fetching data from Json response. </p>
  
  <p>Here is an example data structure :</p>
  
  <pre><code>(
       {
          AT = "&lt;null&gt;";
          DId = 0;
          DO = 0;
          PLId = 33997;
          PdCatList =  (
                         {
                  PLId = 33997;
                  PPCId = 0;
  
                  pdList = (
                        {
                          IsDis = 0;
                          IsPS = 0;
                          IsT = 1;
                          PA = 1;
                          PCId = 119777;
                       }
                  );
              }
          );
          PdId = 0;
          SId = 0;
          Sec = 1;
      },
       {
          AT = "&lt;null&gt;";
          DId = 0;
          DO = 11;
          Dis = 0;
          PLId = 34006;
          PdCatList =   (
                  {
  
                  PLId = 34006;
                  PPCId = 0;
                  pdList =  (
                         {
                          IsDis = 0;
                          IsPS = 0;
                          IsT = 1;
                          PA = 1;
                          PCId = 119830;
                         },
                         {
                          IsDis = 0;
                          IsPS = 0;
                          IsT = 1;
                          PA = 1;
                          PCId = 119777;
                         }
                     );
                },
  
               {
                  PLId = 33997;
                  PPCId = 0;
                  pdList = (
                        {
                          IsDis = 0;
                          IsPS = 0;
                          IsT = 1;
                          PA = 1;
                          PCId = 119777;
                       }
                  );
              }
  
          );
          PdId = 0;
          SId = 0;
          Sec = 1;
      },
  )
  </code></pre>
  
  <p>how would i parse the resulting Structure ?
  I would like to get a list of values directly. What if i have several values in a tupel for example performer PdCatList, pdList. How would i access those values?
  Can anyone help me</p>
  
  <p>Thank's</p>
  
  <p>my code is </p>
  
  <pre><code>NSError *error;
      Array1 = [NSJSONSerialization JSONObjectWithData:responseData options:kNilOptions error:&amp;error];
  
      for(int i=0;i&lt;[Array1 count];i++)
      {
          NSDictionary *dict1 = [Array1 objectAtIndex:i];
  
          NSLog(@"Array1.....%@",dict1);
  
          Array2=[dict1 valueForKey:@"PdCatList"];
  
          for(int i=0;i&lt;[Array2 count];i++)
          {
  
              NSDictionary *dict2 = [Array2 objectAtIndex:i];
  
              NSLog(@"Array2.....%@",dict2);
  
              Array3=[dict2 valueForKey:@"pdList"];
  
              for(int i=0;i&lt;[Array3 count];i++)
              {
  
                  NSDictionary *dict3 = [Array3 objectAtIndex:i];
  
                  NSLog(@"Array3.....%@",dict3);
  
              }
  
  
          }
  
  
      }
  </code></pre>