Skip to main content
Browse Documentation

Get node's children

Created by Alex Pop, last updated 07 Aug 2020

Get all the children of a specific node by specifying the node id or a NodeGetChildrenOptions object.

getChildren(idOrOptions: string | NodeGetChildrenOptions): Promise<Node[]>

Example

client.nodes.getChildren('c31111e7-76f7-46dd-93fb-cbf81a853a37')
  .then(result => {      
    console.log('API call result: ', result);              
  })
  .catch(error => {
    console.log('API call fetch error: ', error);      
});

client.nodes.getChildren({ id: 'c31111e7-76f7-46dd-93fb-cbf81a853a37',  language: 'fr-FR' })
  .then(result => {      
    console.log('API call result: ', result);              
  })
  .catch(error => {
    console.log('API call fetch error: ', error);      
});