title: Django REST Framework Render a result from an hyperlink in API response
body: <p>I am building an application with a DRF/React stack, and I have a bit of an issue.</p>
  <p>I am using a <code>HyperlinkedModelSerializer</code> to be able to easily make a GET request with the link given. On a less optimistic note, I am not able to query my result that easily.</p>
  <p>Here is an example of my json object I get from my API</p>
  <pre class="lang-json prettyprint-override"><code>[
      {
          &quot;url&quot;: &quot;http://localhost:8000/session/3/&quot;,
          &quot;session_start&quot;: &quot;01:00:17.234060&quot;,
          &quot;nb_person&quot;: 1,
          [...]
          &quot;client&quot;: &quot;http://localhost:8000/client/1/&quot;
      }
  ]
  </code></pre>
  <p>There is an array I want to render in my template. Althought, I wanted to show the client firstname and lastname I get from my <code>client</code> link.</p>
  <pre><code>    function GetContactFromAPI(url)
      {
          var name = &quot;&quot;
          axios.get(url).then(response =&gt; {
              const data = response.data
              name = `${data.firstname} ${data.lastnom}`
              return name
          })
          return name
      }
  
      return (
          &lt;div&gt;
              &lt;table&gt;
                  &lt;thead&gt;
                      &lt;tr&gt;
                          &lt;th&gt;Client&lt;/th&gt;
                          &lt;th&gt;Nb Pers.&lt;/th&gt;
                          &lt;th&gt;Starting time&lt;/th&gt;
                      &lt;/tr&gt;
                  &lt;/thead&gt;
                  &lt;tbody&gt;
                      {sessions.map((session, index) =&gt; {
                          return (
                              &lt;tr key={index}&gt;
                                  &lt;td&gt;{GetContactFromAPI(session.client)}&lt;/td&gt;
                                  &lt;td&gt;{session.nb_person}&lt;/td&gt;
                                  &lt;td&gt;{session.session_start}&lt;/td&gt;
                              &lt;/tr&gt;
                          )
                      })}
                  &lt;/tbody&gt;
              &lt;/table&gt;
          &lt;/div&gt;
      );
  </code></pre>
  <p>I think I have some misunderstanding on sync/async in order to render the result I need. Do you have an idea to resolve this need?</p>
  <p>I was thinking to get an client list and to get client I need. But I wanted to avoid this request that may bigger than needed (I have more than 40K clients).</p>
  <p>Thanks in advance</p>