In Rails I'm rendering a json array, but I need one of the keys to have a variable name depending on the params. something like this:
render json: {
key1: values
params[:type]: more_values,
labels: some_lables
}
obviously this doesn't work, but what will?
key1: values
– inye 4 hours ago