title: alert JSON element by using jquery
body: <p>i am trying to alert a <code>JSON</code> element using <code>JQuery</code> , here is my code:</p>
  
  <p>data.js JSON data</p>
  
  <pre><code>[
      {
    "name": "bader",
    "major": "medicine",
    "id": "334453"
      }
  ]
  </code></pre>
  
  <p>Jquery code</p>
  
  <pre><code>$(document).ready(function() {
  
        $.getJSON("data.js", function(json) {
     alert("JSON Data: " + json.name);
   });
  
  
  
  });
  </code></pre>
  
  <p>i tried to inspect element i had this error on my consol </p>
  
  <pre><code>XMLHttpRequest cannot load file:///data.js. Origin null is not allowed by Access-Control-Allow-Origin.
  </code></pre>
  
  <p>i am still very new to handling <code>JSON</code> and <code>JQUERY</code> , i do not know where i went wrong here , if someone could help</p>