title: How to render nested array elements in React?
body: <p>I want to render nested array elements. To render elements I used .map but it is not working for second array.</p>
  
  <blockquote>
    <p>Using list=[{value: 'One', list:[{value: 'abc', selected: false},
    {value: 'efg', selected: false}]}, {value: 'Two', list: [{value:
    'psr', selected: false}]}];</p>
  </blockquote>
  
  <pre><code>   list.map((item, index) =&gt; {
          return (
            &lt;div key={index}&gt;
              &lt;ul &gt;{item.value}&lt;/ul&gt;
              item.list.map((subitem, i) =&gt; {
                return (
                   &lt;ul &gt;{subitem.value}&lt;/ul&gt;
                )
              })
            &lt;/div&gt;
          )
        })
  </code></pre>
  
  <p>Am I missing anything here?</p>
  
  <p>Thanks</p>