title: React: Variable after keyname in map function
body: <p>Hi I have this Code with objects:</p>
  
  <pre><code>const data = [{
  item1: {
      ans1: "Ich",
      ans2: "Du",
      ans3: "Jemand",
      ans4: "Egal",
      correct: 3,
      quest: "Wer hat die Kokosnuss geklaut?"
  }];
  </code></pre>
  
  <p>and this:</p>
  
  <pre><code>    render() {
      const hereGoesMyLevelNum = this.state.level;
      const answers = data.map((answer) =&gt; {
          return (
            &lt;ul&gt;
                &lt;li&gt;{answer.item1.ans1}&lt;/li&gt;
                &lt;li&gt;{answer.item1.ans2}&lt;/li&gt;
                &lt;li&gt;{answer.item1.ans3}&lt;/li&gt;
                &lt;li&gt;{answer.item1.ans4}&lt;/li&gt;
            &lt;/ul&gt;
          )
      });
  
      return (
        &lt;div className="App"&gt;
           &lt;ul&gt;{answers}&lt;/ul&gt;
        &lt;/div&gt;
      );}} export default App;
  </code></pre>
  
  <p>I want to get the "answers.items" dynamically by passing the level number from the state to it.
  Something like:</p>
  
  <pre><code>{answer.item{hereGoesMyLevelNum}.ans1}
  </code></pre>
  
  <p>Can you help me please? :)</p>