set colorData jvector map in Laravel

I want to set the search result data of a particular query to be green (where the data is), while the color of the province where the data is not present is white. Here is the code for the map using jvectormap and jquery.

var jQuery_1_8_2 = jQuery.noConflict();
    $(function () {
        var array = JSON.parse('{!! !empty($total_search_query) ? json_encode($total_search_query) : "[]" !!}');

        var obj = {};
        for (var i in array) {
            var provName = array[i]['name'];
            var idProv = array[i]['noProv'];
            var a = array.find(a => a.name === myTrim(provName))['name'];
            var c = array.find(a => a.name === myTrim(provName))['count'];
            var x = provName;
            var y = idProv;

            if (a){
                var name = y;
                var value = '#015931';
                obj[name] = '#015931';

                var colorData = obj;
                console.log(a )
            }
        }

        $('#map2').vectorMap({
            map: 'indonesia-adm1_merc',
            container: $('#map2'),
            backgroundColor: '#ADF3F0',
            regionStyle: {
                initial: {
                    fill: '#FFFFFF'
                },
                selected:{
                    fill: '#2A3F52'
                },
                hover: {
                    fill: '#175083'
                },
            },
            series: {
                regions: [{
                    values: colorData,
                    attribute: 'fill'
                }]
            },
            zoomButtons: false,
            zoomOnScroll: false,
            zoomOnClick: false,
            zoomMax: 1,
            normalizeFunction: 'polynomial',
            onRegionClick: function (event, code) {
                var url = '{!! route("search", ["q" => request()->input("q"), "province" => ":id"]) !!}';
                url = url.replace("%3Aid", code.toLowerCase());
                window.location.href = url;
            },
            showTooltip: true,
            regionTipShow: true,
            onRegionTipShow: function (event, label, code) {
                var map = $('#map2').vectorMap('get', 'mapObject');
                var regionName = map.getRegionName(code);
                var b = array.find(a => a.name === myTrim(regionName));

                if (b) {
                    var a = array.find(a => a.name === myTrim(regionName))['count'];
                    label.html('<div class="map-tooltip"><h4 class="header">' + regionName + '</h4><p class="description">Total: ' + a + '</p></div>');
                } else {
                    label.html('<div class="map-tooltip"><h4 class="header">' + regionName + '</h4><p class="description">Total: ' + 0 + '</p></div>');
                }
            }
        });
    } (jQuery_1_8_2));

and this is the code for the search query ($total_search_query).

public function getTotalEntryByTitle($title){
    $total = [];

    $province = t_data_enum::where('ekey', 'province')->orderBy('etext', 'ASC')->get();
    foreach($province as $a){
        $entrys = t_e_elem::selectRaw('t_entry.*,t_e_elem.*')
            ->join('t_entry', 't_e_elem.eid', '=', 't_entry.eid')
            ->join('t_e_value', 't_e_elem.fid', '=', 't_e_value.elid')
            ->join('t_entry_form', 't_e_value.fid', '=', 't_entry_form.fid')
            ->where('t_e_elem.fuse', '=', 1)
            ->where(function ($query) use ($title) {
                $query->where('t_entry.etitle', 'ilike', $title)->orWhere('t_entry.edesc', 'ilike', $title);
            });
        $entrys = $entrys->where('t_entry.estatus', '1');

        $formIdP = t_entry_form::where([['etype', 1], ['fname', 'field_province']])->first()->fid;
        $entrys = $entrys->where([['t_e_value.fid', '=', $formIdP], ['t_e_value.vvalue', '=', $a->eval],
            ['t_e_elem.fuse', '=', 1]]);

        $entrys = $entrys->distinct("t_entry.eid")
            ->where(function($query) use ($title) {
                $query->where('t_entry.etitle','ilike', $title)->orWhere('t_entry.edesc', 'ilike', $title);})
            ->get();

        array_push($total, [
            'name' => $a->etext,
            'count' => count($entrys),
            'noProv' => $a->eval
        ]);
    }

    return $total;
}

The result now shows a map that is all green. even though there should also be provinces that are white.

Is there any code I need to change or add?

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum