title: How to parse an std object to get specific data
body: <p>I tried to convert this result to an array,I used json_decode() but I always got null then I used Service_json() and I solve the problem.</p>
  
  <p>After that, I got this result but now I have a difficulty to get some specific data like categorie,nom, marque and their values and I got empty result.</p>
  
  <p>Here is the array:</p>
  
  <pre><code>array(1) {
    ["hits"]=&gt;
    object(stdClass)#3 (1) {
      ["hits"]=&gt;
      array(7) {
        [0]=&gt;
        object(stdClass)#4 (2) {
          ["_id"]=&gt;
          string(20) "kN5iEXIBfVAlCluoT3sT"
          ["_source"]=&gt;
          object(stdClass)#5 (3) {
            ["categorie"]=&gt;
            string(7) "Bonbons"
            ["marque"]=&gt;
            string(6) "MENTOS"
            ["nom"]=&gt;
            string(29) "Bonbons parfums fruits MENTOS"
          }
        }
        [1]=&gt;
        object(stdClass)#6 (2) {
          ["_id"]=&gt;
          string(20) "kd5iEXIBfVAlCluoT3sT"
          ["_source"]=&gt;
          object(stdClass)#7 (3) {
            ["categorie"]=&gt;
            string(7) "Bonbons"
            ["marque"]=&gt;
            string(6) "MENTOS"
            ["nom"]=&gt;
            string(21) "Bonbons menthe MENTOS"
          }
        }
        [2]=&gt;
        object(stdClass)#8 (2) {
          ["_id"]=&gt;
          string(20) "kt5iEXIBfVAlCluoT3sT"
          ["_source"]=&gt;
          object(stdClass)#9 (3) {
            ["categorie"]=&gt;
            string(7) "Bonbons"
            ["marque"]=&gt;
            string(6) "MENTOS"
            ["nom"]=&gt;
            string(37) "Bonbons caramel/chocolat blanc MENTOS"
          }
        }
        [3]=&gt;
        object(stdClass)#10 (2) {
          ["_id"]=&gt;
          string(20) "k95iEXIBfVAlCluoT3sT"
          ["_source"]=&gt;
          object(stdClass)#11 (3) {
            ["categorie"]=&gt;
            string(7) "Bonbons"
            ["marque"]=&gt;
            string(6) "Mentos"
            ["nom"]=&gt;
            string(31) "Bonbons caramel/chocolat MENTOS"
          }
        }
        [4]=&gt;
        object(stdClass)#12 (2) {
          ["_id"]=&gt;
          string(20) "lN5iEXIBfVAlCluoT3sT"
          ["_source"]=&gt;
          object(stdClass)#13 (3) {
            ["categorie"]=&gt;
            string(7) "Bonbons"
            ["marque"]=&gt;
            string(6) "MENTOS"
            ["nom"]=&gt;
            string(28) "Bonbons menthe sucres MENTOS"
          }
        }
        [5]=&gt;
        object(stdClass)#14 (2) {
          ["_id"]=&gt;
          string(20) "ld5iEXIBfVAlCluoT3sT"
          ["_source"]=&gt;
          object(stdClass)#15 (3) {
            ["categorie"]=&gt;
            string(7) "Bonbons"
            ["marque"]=&gt;
            string(6) "MENTOS"
            ["nom"]=&gt;
            string(31) "Bonbons framboise orange MENTOS"
          }
        }
        [6]=&gt;
        object(stdClass)#16 (2) {
          ["_id"]=&gt;
          string(20) "lt5iEXIBfVAlCluoT3sT"
          ["_source"]=&gt;
          object(stdClass)#17 (3) {
            ["categorie"]=&gt;
            string(7) "Bonbons"
            ["marque"]=&gt;
            string(6) "MENTOS"
            ["nom"]=&gt;
            string(26) "Bonbons pomme verte MENTOS"
          }
        }
      }
    }
  }
  </code></pre>
  
  <p>How can I parse this array to get categorie nom and marque and their values?</p>