- [[Beanshell]] [[JMeter]]
- Last Updated: [[2020-12-04]]
- # How to use a variable within a variable
- To use a variable within a variable (using the format `${variable_x}` where both `${variable}` and `${x}` are variables, use the following code:
- `${__BeanShell(vars.get("detailRef_" + vars.get("counter")))}`
- The result of this will fetch the value of `${detailRef_1}`, where 1 is the counter variable.
-