title: node-oracledb giving Error: NJS-044: named JSON object is not expected in this context while executing stored procedure
body: <p>I am facing an issue to call oracle db stored procedure using node-oracledb npm <em>("oracledb": "^3.1.2")</em> and <em>("@types/oracledb": "^3.1.0")</em> into node.js application. The stored procedure takes 3 input paramters of type string, string and array of oracleDB type respectively. However, while passing last parameter of DB type, node.js application throws an exception of <em>"NJS-044: named JSON object is not expected in this context"</em>.</p>
  
  <pre class="lang-js prettyprint-override"><code>
  // DB payload
  let obj = {
          tableOwner: 'Mr X',
          tableName: 'Demo',
          retentionData: this.CreateArrayFromJSONObject(array_of_data)
          }
  
  // DB procedure
  let procedure: string = `BEGIN PKG_ARCHIVAL_TOOL.P_RETENTION_POLICY_CREATE(:tableOwner, :tableName, :retentionData); END;`;
  
  /// DB execution function call
  DBService.getInstance().ExecuteDBProcedureRequest(procedure, userPolicyJSON);
  
  // DB executing
  public ExecuteDBProcedureRequest = (procedure: string, inputBody: any) : Promise&lt;any&gt; =&gt; {
          return new Promise((resolve, reject) =&gt; {
              DBConn.execute(procedure, inputBody, { autoCommit: true}, (err: oracledb.DBError, result: oracledb.Result) =&gt; {
                  if(err) {
                      reject(err);
                  }
                  if(result) {
                      resolve(Utils.CreateJSONObject(result));
                  }
              })
          });
      }
  
  // SQL procedure call
  PKG_ARCHIVAL_TOOL.P_RETENTION_POLICY_CREATE(
                          P_TABLE_OWNER =&gt; P_TABLE_OWNER,
                          P_TABLE_NAME =&gt; P_TABLE_NAME,
                          P_RETEN_DATA =&gt; V_DATA,
                          P_ID =&gt; V_ID,
                          P_OUT =&gt; V_OUT
                  );
  
  P_RETEN_DATA is a table of a record:-
  Record - TYPE R_RETENTION_POLICY_DEF IS RECORD(
          COLUMN_NAME    VARCHAR2(40) NOT NULL DEFAULT ' ',
          COLUMN_POS     NUMBER       NOT NULL DEFAULT 1,
          COLUMN_TYPE    VARCHAR2(10) NOT NULL DEFAULT 'NUMBER',
          OPERATOR       VARCHAR2(10) NOT NULL DEFAULT '=',
          GATE           VARCHAR2(10) DEFAULT NULL,
          BRAC_ST        NUMBER       DEFAULT 0,
          BRAC_ED        NUMBER       DEFAULT 0
  );
  Table :- TYPE T_RETENTION_POLICY_DEF IS TABLE OF R_RETENTION_POLICY_DEF;
  
  array_of_data = [["FNAME, 1, "VARCHAR2", "&gt;", "OR", 0, 0], ["LNAME, 1, "VARCHAR2", "=", "AND", 0, 0]]
  </code></pre>