I have API data in my React component. It's in the form of
{weather.Wind.Speed.Metric.Value}
Is there any way I can swap Metric out for a variable such as unit.
For example something like
const unit = 'Metric';
{weather.Wind.Speed.${unit}.Value}
That way I can update the variable and show the correct data?