Loading TOC...

Node.toObject

Node.toObject() as Object

Summary

This is inherited from the Value object.

Return a JavaScript object value.

Usage Notes

Array nodes will be returned as JavaScript arrays, object nodes will be returned as JavaScript objects, and text, number, or boolean nodes will be returned as String, Number, or Boolean values, respectively. Document nodes will have their child converted.

xs:date and xs:dateTime will be returned as JavaScript date objects.

The method is undefined for other kinds of nodes (XML and binary nodes).

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.