in php i get an array from pgsql:
$res = $db
->query( "SELECT myarray FROM arrays WHERE array_name=smth" )
->fetchRow();
exit (json_encode($res));
Type in pgsql is integer[]
But in JS I get JSON with one string "{1,2,3,...,}" How to get in 'array-way' this data?