sars-scanner/parse-json.php
2020-03-09 19:26:19 +01:00

12 lines
420 B
PHP

<?php
include 'config.php';
$sql = "SELECT scans.id, content FROM scans inner join sites on sites.id=scans.site where sites.type='json' and parsed=0";
$sql = "SELECT scans.id, content FROM scans where id = 2235";
foreach ($pdo->query($sql) as $row){
$fromJSON = json_decode($row['content']);
foreach ($fromJSON->features as $feature){
$feature = $feature->attributes;
var_dump($feature);
}
}