title: Oracle Reading a JSON_LIST of JSON_LIST using PLJSON
body: <p>I'm trying to read a JSON object with has nested lists.  Which looks like this:</p>
  
  <pre><code>[{
      "id": 70070037001,
      "text": "List 1",
      "isleaf": 0,
      "children": [
          {
              "oid": 100,
              "text": "Innerlistobject100",
              "isleaf": 0,
              "children": [
                  {
                      "sid": 1000,
                      "text": "Innerlistobject1000",
                      "isleaf": 1
                  },
                  {
                      "sid": 2000,
                      "text": "Innerlistobject2000",
                      "isleaf": 1
                  }
              ]
          },
          {
              "oid": 200,
              "text": "Innerlistobject200",
              "isleaf": 0,
              "children": [
                  {
                      "sid": 1000,
                      "text": "Innerlistobject1000",
                      "isleaf": 1
                  },
                  {
                      "sid": 2000,
                      "text": "Innerlistobject2000",
                      "isleaf": 1
                  }
              ]
          }
      ]
  }]
  </code></pre>
  
  <p>ref: <a href="https://sourceforge.net/p/pljson/discussion/935365/thread/375c0293/" rel="nofollow">https://sourceforge.net/p/pljson/discussion/935365/thread/375c0293/</a> - where the person is creating the object, but I want to do the opposite and read it.</p>
  
  <p>Do I have to iterate like this (note name is children within children):</p>
  
  <pre><code>Declare
      l_Children_List                json_list;
      JSON_Obj                     json;
      l_Child_JSON_Obj                     json;
  Begin
  IF (JSON_Obj.exist ('children')) THEN
      IF (JSON_Obj.get ('children').is_array)
      l_Children_List := json_list (JSON_Obj.get ('children'));
      FOR i IN 1 .. l_Children_List.COUNT
  
          IF (JSON_Obj.exist ('children')) THEN
              IF (JSON_Obj.get ('children').is_array)
              l_Children_List := json_list (JSON_Obj.get ('children'));
              FOR i IN 1 .. l_Children_List.COUNT
  
                  jSON_child_val := l_Children_List.get (i);
                  l_Child_JSON_Obj := json (jSON_child_val );
  
              LOOP
          End If;
  
      LOOP
  End If;
  End;
  </code></pre>