The JSON format I am getting is:
{
"test":[
{"key1":"value1"},
{"key2":"value2"}
]
}
But is it possible to get this format instead?
{
"test": {
"key1":"value1",
"key2":"value2"
}
}
My php code is this:
$key=$row[1];
$value=$row[2];
$posts[] = array($key => $value);
$response['strings'] = $posts;
fwrite($out, json_Encode($response))
I've been stuck on this for hours, someone please help! Thanks in advance!