In QIE, JSON and XML arrays are referenced differently because JSON has explicit array syntax, while XML uses repeated elements selected with XPath predicates.
JSON: use JPath with / hierarchy plus an array qualifier.
Examples:
/phoneNumbers → the whole array
/phoneNumbers/[1] → first array item
/phoneNumbers/[usage="home"]/number → the number field from the matching array object
XML: use standard XPath. XML doesn’t have a native “array” type; what acts like an array is usually a set of repeating sibling elements.
Examples:
/bookstore/book → all repeated book elements
/bookstore/book[1] → first book
/bookstore/book[last()] → last book
A simple way to think about it:
JSON array item: /parentArray/[n]
XML repeated element: /parent/element[n]
QIE’s training docs summarize this as:
JSON JPath: {/ParentObject/ChildArray/[instance]/ChildProperty}
XML: standard XPath notation
So the practical difference is:
In JSON, the array itself is a node and you step into an item with /[n].
In XML, repeated elements are just matching nodes, and you select one with [n] directly on the element name.
Note: referencing an array in JSON using the XML repeated element node path nomenclature will return incorrect results.