Could you try to create a process object with one field(Design home > new > process Object) with data type as integer and create a output variable of type process object and try the same ?
Please find the attached screenshots:
for second query:
Use the below sample Xquery to let ICRT know that its of type array and not primitive type:
Hi Prakash, Thank you for the detailed response. This approach is getting rid of double quotes but the JSON response is not in the format expected. We need the JSON output as below:
For the array issue, can we assign xquery (with root xmlns) output to a process object field? I think we cannot. For xquery approach, we should have the output field type defined as a text and use util:toJSON() for converting the xquery output to JSON. Please let me know if my understanding is not correct or if I'm missing anything.
Have you tried making your output field an Array of Any and inserting your process object into that field? I would expect it to output an array.
Another, cruder approach would be to return a text value that is actually your JSON. You could follow the steps in https://kb.informatica.com/howto/6/Pages/18/496298.aspx and replace the CSV input with your object.
I actually did what you are trying to do once, but can't find the process at this time. If I find it later I will update this response with the example.