title: ES6 destructuring to get the nth item from inner array
body: <p>I have an array in my state in my React project. something like :</p>
  
  <pre><code>state = {
     cats : [
        {cid : 1 , value : 1}
        {cid : 2 , value : 3}
        {cid : 3 , value : 4}
     ],
     curpage : 3
  }
  </code></pre>
  
  <p>now all I want is to get <code>nth item</code> of the array <code>cats</code> with destructring. I tried</p>
  
  <pre><code>const { cat : {cats[id]} } = this.state;
  </code></pre>
  
  <p>or </p>
  
  <pre><code> const { cats[id] } = this.state;
  </code></pre>