title: How to get a JSON file from another domain using cross domain - javascript?
body: <p>this is the json file im trying to work with:
  <a href="http://www.oref.org.il/WarningMessages/alerts.json" rel="nofollow">http://www.oref.org.il/WarningMessages/alerts.json</a>
  Im trying to retrieve the "data" array which is empty for most of the time.</p>
  
  <p>Im having some issues with cross domain, i get an 'Access-Control-Allow-Origin ' error message.</p>
  
  <pre><code>$.ajax({
    url : "http://www.oref.org.il/WarningMessages/alerts.json",
    type : 'GET',
    crossDomain: true,
    data : "json", 
    dataType : "json",
    success : function(res) {
      console.log('res',res);
    }
  });
  </code></pre>
  
  <p>I also tried some jsonp ways to get the data but i had no success.
  Can someone help me fix my code?</p>