I am trying to create a json encoded array that results like this:
{
"properties": [
{
"property": "email",
"value": "[email protected]"
}
]
}
This is my code:
$data = array("properties"=>array("property"=>"status", "value"=> "Pending Approval"));
$data_string = json_encode($data, true);
echo "<pre>";
print_r($data_string);
echo "</pre>";
Which then gives me the results of:
{
"properties":{
"property":"status",
"value":"Pending Approval"
}
}
But yet the API then responds back after a curl method that states:
Json node is missing child property
Why is the child property missing? It's been defined - what am I missing on this?