title: JSON_QUERY: Path expression based on variables?
body: <p>is it possible to define the path expression in JSON_QUERY dynamically based on variables?</p>
  
  <pre><code>DECLARE
      varpath varchar(180):= 'testvar1.testattribute';
  BEGIN
      SELECT (JSON_QUERY(json_field FORMAT JSON , '$.' || varpath RETURNING VARCHAR2(4000) ASIS  WITHOUT ARRAY WRAPPER NULL ON ERROR)) FROM example1; 
  END;
  </code></pre>
  
  <p>The concatenation of <code>'$.' || varpath</code> leads to the error:</p>
  
  <blockquote>
    <p>PL/SQL: ORA-40454: path expression not a literal.</p>
  </blockquote>
  
  <p>Is there any way to achieve this? In my use case, I need to fetch the path dynamically from other tables, that's why I built this short test script.</p>
  
  <p>Thanks in advance!</p>