I'm showing a layer over a google map and I wanna change layer's style.
I have a select control that contains dataset's columns, so when the user selects an option I'm getting to carto the unique values column.
So these values I wanna take and assign them a color and apply it to the layer.
Here is a sample that I want to.
It looks you are looking for the setContent
method for your Style. You have an example of editing CartoCSS here and also here.