title: Call JSON data from External file using Ajax
body: <p>I'm calling a external JS file having some sample JSON code, when I try to put sample json code in the file, it throws me error at ":", but when I validate that using online tools, it says as valid json. What is going wrong in this code? </p>
  
  <p>Here is my code </p>
  
  <pre><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"&gt;&lt;/script&gt;
  
  
    &lt;script&gt;
  $(document).ready(function() {
  
      $('#click').click(function() {
          $.ajax({
              url: "json.js",
              method: "GET",
              dataType: 'application/json',
              contentType: "application/json",
               success: function(result){
                    console.log(result);
               },
               error:function() {
                   alert("Error")                  
               }
          });
      });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>My external json.js</p>
  
  <pre><code>{
  "data": [{      ------&gt; throwing error at ":" as Syntax error on token ":", ; expected
      "Service": "INSTACC",
  
      "Create Date": "30-Jul-2016"
  
  
  }, {
      "Service": "INSTACC",
  
      "Create Date": "30-Jul-2016"
  
  
  }]
  
  }
  </code></pre>