Loading TOC...

NodeBuilder.addNode

NodeBuilder.addNode(
   $node as Node
) as This NodeBuilder object

Summary

Add a node to the node tree the builder is building.

Parameters
$node The node to add.

Example

const builder = new NodeBuilder();
builder.addNode(
  { lat: 12.2,
    long: -122.45,
    handle: '@johnqpublic',
    text: 'Here is my first tweet!'
  }
);
builder.toNode();

// Returns a JSON object node equivalent to the following:
//
// { "lat":12.2, 
//   "long":-122.45, 
//   "handle":"@johnqpublic", 
//   "text":"Here is my first tweet!"
// }

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy