Given the following JSON
$first = array('code'=>'200','message'=>'ok');
{
"code": "200",
"message": "ok"
}
$second = array("user"=>array('fname'=>'Fred','lname'=>'Flintstone','status'=>'1'))
{
"user": [
{
"fname": "Fred",
"lname": "Flintstone",
"status": "1"
}
]
}
How do I combine these to get the output as follows.
{
"code": "200",
"message": "ok",
"user": [
{
"fname": "Fred",
"lname": "Flintstone",
"status": "1"
}
]
}