The input data needs to be in the json.
You can either convert it to JSON in your app or send it as a string and convert to JSON in the jsreport custom script