Здравствуйте. Формирую массив в PHP таким путем:
<?php
$massiv = array();
foreach($deliveries as $delivery){
$massiv[] = array(
"type"=>"Feature",
"id" => $delivery->id,
"geometry" => array(
"type" => "Polygon",
"coordinates" => $delivery->map
)
);
};
$result = array("type" => "FeatureCollection","features" => $massiv);
echo json_encode( $result );
?>
Но на выходе значение id и значение coordinates заключаются в кавычки. Т.е. вместо нужного:
"id":12
получается
"id":"12"
Подскажите как исключить кавычки из значений id и coordinates?
В данный момент на выходе:
{"type":"FeatureCollection","features":[{"type":"Feature","id":"12","geometry":{"type":"Polygon","coordinates":"[[[39.711474857055116,43.5914206561279],[39.713963947020936,43.58262375085823],[39.72769685717719,43.57189102130725],[39.748124561034615,43.57638402624879],[39.73379083605902,43.59684788797694],[39.711474857055116,43.5914206561279]]]"}},{"type":"Feature","id":"13","geometry":{"type":"Polygon","coordinates":"[[[39.71058325351473,43.59175042142238],[39.74021278427924,43.59829802584345],[39.76922355698431,43.60466020519489],[39.74862419174994,43.62623666828065],[39.70176063584172,43.614888171155215],[39.709124131810626,43.594557656382264],[39.71058325351473,43.59175042142238]]]"}}]}