You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Send JSON Data prepared in a module function to PL/SQL procedure

edited Jan 9, 2020 7:53AM in Visual Builder 2 comments

Content

Hi,

There is a requirement to pass  json type data to pl/sql procedure.

Currently, we are  passing json after stringify and then replacing " with \".  Since just doing stringify was not working for us hence we have to go for replace.

Below is the code for your reference

var obj={"po_line_details_array":payload,"po_line_array":PoLineArray}; 
var newObj= JSON.stringify(obj).replace(/"/g, '\\"');
console.log(newObj);
return newObj;

Here, payload and PoLineArray are arrays.

newObj is returned by my module function and send to custom rest service which calls the procedure that accepts this object  as parameter. The data type of input parameter in pl/sql procedure is CLOB .

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!