hbase_user
hbase_user

Reputation: 529

Json decoded array

I have,

Hypertable_ThriftGen_HqlResult Object
(
  [results] => 
   [cells] => Array
      (
       [0] => Hypertable_ThriftGen_Cell Object
               (
                   [key] => Hypertable_ThriftGen_Key Object
                      (
                       [row] => abc.com
                            [column_family] => domain_name
                           [column_qualifier] => 
                         [timestamp] => 1.30189374164E+18
                         [revision] => 1.30189374164E+18
                           [flag] => 255
                        )
 [value] => www.abc.com
                )
)

How can I retrieve each individual values??

It seems like a json decoded array, not sure though.

Upvotes: 0

Views: 141

Answers (1)

Anton S
Anton S

Reputation: 12750

You have an object and you can iterate over it like you iterate over array

foreach($yourobject->cells as $rows){
    foreach($rows as $row){
        print_r($row->key);
    }
}

Upvotes: 2

Related Questions