Structured types

JSONiq introduces four more types for matching objects and arrays. Like atomic types, they do not need the js: prefix in the syntax (object instead of js:object, etc.).

All objects match the item type js:object.

All arrays match the item type js:array.

All objects and arrays match the item type js:json-item.

For engines that also support optionally XML, js:structured-item matches both XML nodes and JSON objects and arrays.

Figure 7. StructuredType