title: How to load a JSON file from local machine to a variable using Angularjs?
body: <p>I'm adding the syntax I'm using to add the external json file named view.json into my controller.js, but it is not giving the desired output or I'm not getting any response in console.</p>
  
  <pre><code>$.require(['api-data/actions/product/view.json'], function(data) {
    $scope.data=data;console.log(data);
  </code></pre>
  
  <p>view.json</p>
  
  <pre><code>{ 
  
          'key':'{"name":"data[key]","id":"input_token","placeholder":"API token","description":"Enter the api_token","value":"","type":"text","required":"required"}',
  
          'filter': {
  
                'name':  '{"name":"data[filter][name]","id":"input_name","placeholder":"not mandatory","description":"leave blank   ","value":"","type":"text","required":""}',
      },
  
      'extra': {
          'pageJump': '{"name":"data[extra][pagejump]","placeholder":"First Name","description":"Enter page number[0,1,-1]","value":"0","type":"text","required":"required"}'
  }
  </code></pre>