Can't load additionl json file

I want to use json file content ( my json file is inside forms folder and i want to) inside my code
and for getting this data i use this script

var jsonFile=[];
inject(['$http', 'Uri', function($http, Uri) {
      camForm.on('form-loaded', function() {
        $http.get(Uri.appUri("engine://engine/:engine/task/" + "Task_0wobaoz" + "/form")).success(function(result){
          var filePath = result.contextPath+'/forms/data.json';
         $.getJSON(filePath, function(json) {
                var jsonData=JSON.parse(json); 
				for(var i=0;i<Object.Keys(jsonData).length;i++){
                     jsonFile.push(jsonData[i]);
                  }
			});
        });
      });
    }]);

but this gives me exception like this:
Communication Error :
The application received an unexpected 400 response from the server. Try to refresh the page or login and out of the application.
what should i change to make this code work? will i need to implement this invokation ‘service’ somewhere else?

Hi @Sally,

why do you try to read the JSON file in the HTML form and not in your Java code? Could you please explain your use case?

Cheers
kristin

See this thread for two working examples: Loading previous data in process start form

@kristin i use http conecctor for getting remote service data and ( got this with json format ) and i want to parse and paste this data inside my html form

Hello @StephenOTT
thank you for yout response, i hav tried this exampel several times with small changes bu t i couldn’t get this json file data from file, By the way do you have any idea how should i debug camunda project ?