title: React JS array forEach get refs value using variable
body: <p>How can i get this to work correctly using this method below? I need to go through each value in the array</p>
  
  <pre><code>array.forEach((v) =&gt; {
     let a = `this.refs.a${v}.value`
     console.log(a) // prints this.refs.a0.value
     console.log(this.refs.a0.value) // prints correct value 
  })
  </code></pre>