DimensionalData: How to use a dimension whose name is stored in a variable

Great!, @Raf.
In order to be more precise and use the dimension name stored as a string in a variable, I have coded:

spatial_coord_name = "values"
spatial_dim = dims(raster, Symbol(spatial_coord_name))
raster_selected = raster[
    rebuild(
            spatial_dim,
            Where(c->
                       raster["longitude"][c] ∈ lon1..lon2
                       &&
                       raster["latitude"][c] ∈ lat1..lat2
            )#Where
    )#rebuild
]#ds