this php script
<?php
require('medoo.min.php');
header('Content-type: application/json');
$database = new medoo('brickx');
$datas = $database->select("customer", ["Companyname", "Phonenumber"]);
$jsonresponse = array("customers"=> array());
array_push($jsonresponse["customers"], $datas);
echo (json_encode($jsonresponse));
?>
outputs this kind of json:
{"customers":[[{"Companyname":"company1","Phonenumber":"+567890789"},{"Companyname":"company2","Phonenumber":"5678905678"}]]}
however i need to get rid of the square brackets and get something like
{"customers":{"Companyname":"company1","Phonenumber":"+567890789"},{"Companyname":"company2","Phonenumber":"5678905678"}}
any suggestions?