Hi,
I have the following output json:
[
{
“user_id”: 999,
“user_uuid”: “xxxxxx”,
“first_name”: “xxxxx”,
“last_name”: “xxxxx”,
“gender”: null,
“email_address”: “[email protected]”,
“country”: “XX”,
“date_of_birth”: null,
“stripe_id”: “xxxxxxxxxx”
}
]
I am getting t using below PHP:
$jsonData = array();
while($mysql_row = $mysql_query->fetch())
{
$jsonData[] = $mysql_row;
}
echo json_encode($jsonData);
How can I append the following:
"authenticated": "true",
so the final output will be like this:
[
{
“user_id”: 999,
“user_uuid”: “xxxxxx”,
“first_name”: “xxxxx”,
“last_name”: “xxxxx”,
“gender”: null,
“email_address”: “[email protected]”,
“country”: “XX”,
“date_of_birth”: null,
“stripe_id”: “xxxxxxxxxx”,
“authenticated”: “true”
}
]