title: Map in map : TypeError: Cannot read properties of undefined (reading 'map')
body: <p>I have these datas :</p>
  <pre><code>[
      {
          &quot;id&quot;: &quot;1&quot;,
          &quot;name&quot;: &quot;test1&quot;,
          &quot;secondary&quot;: [
              &quot;testS1&quot;, &quot;testS2&quot;
          ]
      },
      {
          &quot;id&quot;: &quot;2&quot;,
          &quot;name&quot;: &quot;test2&quot;,
          &quot;secondary&quot;: [
              &quot;testS3&quot;, &quot;testS4&quot;
          ]
      }
  ]
  </code></pre>
  <p>I map all exercices from a json file, and now I wish to loop <code>props.exercices.secondary</code> of each object.
  Here is my try :</p>
  <pre><code>export default function AllExos(props) {
      return &lt;div&gt;
          {props.exercices.map(exo =&gt; {
              return &lt;div key={exo.name}&gt;
                  &lt;div&gt;
                       &lt;h2&gt;{exo.id}&lt;/h2&gt;
                       &lt;p&gt;Display secondary :
                              {exo.secondary.map(k =&gt; {
                                  return &lt;span key={k}&gt;{k}&lt;/span&gt;
                              })}
                       &lt;/p&gt;
                   &lt;/div&gt;
               &lt;/div&gt;
          })}
      &lt;/div&gt;
  }
  </code></pre>
  <p>I don't understand why I get the error <code>TypeError: Cannot read properties of undefined (reading 'map')</code>. I am looping in the 'props.exercices', right ?</p>