Using oracle plsql, please tell me how to use JSON_TABLE, bfilename and "bulk collect" in order to read data from a json file.
The json file contains 2 lists of strings:
{
"included_errors": [ "include1", "include2" ],
"excluded_errors": [ "exclude1", "exclude2" ]
}
Without using intermediate tables, I want to load both string lists into 2 list variables which are nested tables, i.e.:
TYPE list_t IS TABLE OF VARCHAR2(100);
l_included_errors list_t;
l_excluded_errors list_t;
Then I will traverse the lists in a for loop.
2
Answers
I ended doing the following, which works:
You can use:
Which outputs:
fiddle