query($sql) as $row){ $fromJSON = json_decode($row['content']); foreach ($fromJSON->features as $feature){ $feature = $feature->attributes; var_dump($feature); } }