php stdclass storing data object instead click below...
$data["list"] = array("0"=> (object) array("category_name"=>$catName));
Answer (1)
You can write something like that...
$data['list'] = (object) array(
"0" => (object) array(
"category_name"=>"category_name")
);