如何在PHP中制作不同的JSON结构

我正在从2个表中检索数据:1)用于家庭横幅,2)用于热卖。 然后,我从中制作REST API。 但是我正在像这样在json中获取数据:

 [
    {
        "homuri": "/Home/Banner/activity.png"
    },
    {
        "homuri": "/Home/Banner/fitness.png"
    },   
    {
        "hotdeal": "/Home/HotDeals/hotdeal1.png"
    },
    {
        "hotdeal": "/Home/HotDeals/hotdeal2.png"
    },
    {
        "hotdeal": "/Home/HotDeals/hotdeal3.png"
    },

]

但我想要这样的json结构:

[
        "banner":{
            "homuri": "/Home/Banner/activity.png",
            "homuri": "/Home/Banner/fitness.png"
        },   
        "hotdeals":{
            "hotdeal": "/Home/HotDeals/hotdeal1.png",
            "hotdeal": "/Home/HotDeals/hotdeal2.png",
            "hotdeal": "/Home/HotDeals/hotdeal3.png",
        },    
]

如何实现呢? 以及如何在HTML中访问所有这些值? 下面我附上我的代码:

<?php

    include('dbconn.php');
    $request=$_SERVER['REQUEST_METHOD'];

    $data=array();
    switch($request)
    {
        case 'GET':
            response(getData());                        
    }

    function getData()
    {
        global $conn;
        @$col=$_GET['col'];

        $query=mysqli_query($conn,"select strHomeBannerUri as homuri from tblhomebannerdetails");

        while($row=mysqli_fetch_assoc($query))
        {
            $data[]=array("homuri"=>$row['homuri']);            
        }

        if($col=="pop")
        {
            $query=mysqli_query($conn,"select nHotrDealImageUri as hotdeal from tblhotdealimages");

        while($row=mysqli_fetch_assoc($query))
        {
            $data[]=array("hotdeal"=>$row['hotdeal']);          
        }

        }           
        return $data;           
    }


    function response($data)
    {
        echo json_encode($data);
    }
?>