Loading TOC...

MarkLogic Server 11.0 Product Documentation
Value.toObject

Value.toObject() as Object

Summary

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.