title: Javascript Fetch inside a map
body: <p>I have a website/portfolio where I display all my projects using the Github API. My goal is to create a filter for these projects, so I created a file in the root of some repositories called &quot;built-with.json&quot;, that file exists in <strong>only two repositories</strong> just for test purpose, that is a array of technologies I used in the project (example: [&quot;React&quot;, &quot;Javascript&quot;, ...]). So I need to fetch the Github APi(that part it's working well), then fetch that file, and return a new Array of projects but with an &quot;filters&quot; key where the value is the array inside of &quot;built-with.json&quot;. Example:</p>
  <p>Github API return (example of just one project returning):</p>
  <pre><code>[{
  &quot;id&quot;: 307774617,
  &quot;node_id&quot;: &quot;MDEwOlJlcG9zaXRvcnkzMDc3NzQ2MTc=&quot;,
  &quot;name&quot;: &quot;vanilla-javascript-utility-functions&quot;,
  &quot;full_name&quot;: &quot;RodrigoWebDev/vanilla-javascript-utility-functions&quot;,
  &quot;private&quot;: false
  }]
  </code></pre>
  <p>New array of objects that a I need:</p>
  <pre><code>[{
  &quot;id&quot;: 307774617,
  &quot;node_id&quot;: &quot;MDEwOlJlcG9zaXRvcnkzMDc3NzQ2MTc=&quot;,
  &quot;name&quot;: &quot;vanilla-javascript-utility-functions&quot;,
  &quot;full_name&quot;: &quot;RodrigoWebDev/vanilla-javascript-utility-functions&quot;,
  &quot;private&quot;: false,
  &quot;filters&quot;: [&quot;HTML5&quot;, &quot;CSS3&quot;, &quot;JS&quot;, &quot;React&quot;]
  }]
  </code></pre>
  <p>This is what I did:</p>
  <pre><code>const url = &quot;https://api.github.com/users/RodrigoWebDev/repos?per_page=100&amp;sort=created&quot;;
  fetch(url)
    .then((response) =&gt; response.json())
    .then((data) =&gt; {
        return data.map(item =&gt; {
          //item.full_name returns the repositorie name
          fetch(`https://raw.githubusercontent.com/${item.full_name}/master/built-with.json`)
            .then(data =&gt; {
              item[&quot;filters&quot;] = data
              return item
            })
        })
      })
    .then(data =&gt; console.log(data))
  </code></pre>
  <p>But it does not work! I get this in the console:</p>
  <p><a href="https://i.stack.imgur.com/UPsQy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UPsQy.png" alt="enter image description here" /></a></p>
  <p>Someone can help me? Thanks in advance</p>
  <p>Note: Sorry if you find some gramatical errors, my English it's a working in progress</p>