Obtains the value of a JSON node which is obtained as result to parse a XML document with the function json.fromXML. This function forces which the result always be an array, independently if the searched object is unique or multiple. This way, it is ensured that the result can be always iterated, instead the searched object is only present once in the document.

1 json.getArray

<json.getArray name='name'>
    <json /> !
</json.getArray>
Example
Copy
<xsql-script name='example_json'>
    <body>

        <set name='m_invoice'>
            <dom.parse>
                <file name='C:\jas\Invoice.xml' type='absolute' />
            </dom.parse>
        </set>
        <set name='m_json'>
            <json.fromXML>
                <m_invoice />
            </json.fromXML>
        </set>
        <iterator name='m_invoice'>
          <in><json.getArray name='Invoice'><m_json /></json.getArray></in>
          <do>
            <println>
              <json.get name='ThirdCode'><m_invoice /></json.get>
            </println>
          </do>
        </iterator>
    </body>
</xsql-script>