title: d3.json method doesn't return my data array
body: <p>I'm using <code>d3.json</code> to load a JSON file containing my data, like this:</p>
  
  <pre><code>var data = d3.json(url, callback)
  </code></pre>
  
  <p>If I do a <code>console.log(data)</code> I can see that <code>data</code> is neither empty nor <code>null</code>. However, it doesn't seem to contain my data array, but something else instead.</p>
  
  <p>What am I doing wrong here?</p>
  
  <hr>
  
  <p><sup>Note: this is a self-answered question, <a href="https://meta.stackoverflow.com/a/314272/5768908">trying to provide a "canonical" Q&amp;A on a subject that has been touched on by many previous questions</a> and not (clearly) explained by the API. The answer below was written as a general guidance to those questions.</sup></p>