I've used the json_encode function in the past to create simply JSON objects like this:
$payload = array ("user" => $username, "password" => $password, "group" => $group);
$payload = json_encode ($payload);
which creates this:
{"user":"john smith","password":"abc12345","group":"sales"}
I now need to generate a JSON array like this:
{
"query": [
{
"Date": "11/01/2017...12/31/2017"
}
]
}
but I can't find the correct syntax.