title: Node.js and express Rest api to create custom fields routes
body: <p>I am working with node.js and express framework for my rest api server.</p>
  
  <p>I have created <code>get</code> routes with query params and working with them. </p>
  
  <p>But I want to make a functionality like facebook graph api where I can send fields with my api routes such as</p>
  
  <pre><code>/me?fields=address,birthday,email,domains.limit(10){id,name,url}
  </code></pre>
  
  <p>I am thinking of getting the fields from the query parameters and then splitting them based on , such as</p>
  
  <pre><code>const fields = req.query.fields;
  let fieldsArray = fields.split(',');
  </code></pre>
  
  <p>But how can I pass the sub object attributes and retrieve them from the route like domain field from the above example.</p>
  
  <p>/me?fields=address,birthday,email,<strong>domains.limit(10){id,name,url}</strong></p>