title: Multi Dimensional Array response.Reduce(minimize) Nested Loops
body: <p>facebook Batch request api gives me the response.and as according to my logic this is the best response i get i want to access the root element "<strong>source_id</strong>" and "<strong>copied_id</strong>" inside the [BODY].
  i just want to access them in minimum loops.</p>
  
  <p>i am currently using nested loops. </p>
  
  <pre><code>Array(
  [0] =&gt; Array
      (
          [0] =&gt; stdClass Object
              (
                  [code] =&gt; 200
                  [body] =&gt; {"copied_adset_id":"15454","ad_object_ids":[{"ad_object_type":"ad_set","source_id":"545454","copied_id":"15454"}]}
              )
          [1] =&gt; stdClass Object
              (
                  [code] =&gt; 200
                  [body] =&gt; {"copied_adset_id":"1547754","ad_object_ids":[{"ad_object_type":"ad_set","source_id":"566454","copied_id":"1547754"}]}
              )
       )
   [1] =&gt; Array
      (
          [0] =&gt; stdClass Object
              (
                  [code] =&gt; 200
                  [body] =&gt; {"copied_adset_id":"1500454","ad_object_ids":[{"ad_object_type":"ad_set","source_id":"598754","copied_id":"1500454"}]}
              )
          [1] =&gt; stdClass Object
              (
                  [code] =&gt; 200
                  [body] =&gt; {"copied_adset_id":"78448","ad_object_ids":[{"ad_object_type":"ad_set","source_id":"541230","copied_id":"78448"}]}
              )
       ))
  </code></pre>
  
  <p>The body contain the JSON response below is the decoded json response.</p>
  
  <pre><code>stdClass Object(
  [copied_adset_id] =&gt; 14848
  [ad_object_ids] =&gt; Array
      (
          [0] =&gt; stdClass Object
              (
                  [ad_object_type] =&gt; ad_set
                  [source_id] =&gt; 14848
                  [copied_id] =&gt; 448486
              )
  
      ))
  </code></pre>