score:-1

Assuming the variable f is the string and d is the number like

// { f: d } 
{"SUCURSALES_BANCA_COMERCIAL":10}

You can do this in your code

.
.
    data.forEach(function(d){
        if(d.ENTIDAD === parseInt(state)){
         services_list.forEach(function(f){
            const obj = {};
            obj[f] = d;
            example.push(obj);
         })
        }
    })
.
.

so your example array would have elements with key-value pairs


Related Query

More Query from same tag