3👍
✅
If you don’t want the object you create to be in an array, then don’t put it in an array!.
Remove array_push($main, $json);
, then json_encode
the $json
variable.
Source:stackexchange.com