title: Drupal 8 Headless - Group fields in view
body: <p>I am trying to create a REST export in Drupal 8 from a node. At this moment the JSON response is like this:</p>
  
  <pre><code>[{
  "title": "test 2",
  "body": "&lt;p&gt;tets&lt;\/p&gt;",
  "created": "10-09-2016 15:57",
  "field_first_name": "John",
  "field_last_name": "Doe"
  }, {
  "title": "test",
  "body": "&lt;p&gt;test&lt;\/p&gt;"
  "created": "10-09-2016 15:56",
  "field_first_name": "John",
  "field_last_name": "Doe"
  }]
  </code></pre>
  
  <p>There are 2 fields, <code>field_first_name</code> and <code>field_last_name</code>, which are fields from the user who created the node. I wonder if it is possible to group those fields. So the response will look as something like this:</p>
  
  <pre><code>[{
  "title": "test 2",
  "body": "&lt;p&gt;tets&lt;\/p&gt;",
  "created": "10-09-2016 15:57",
  "user": {
     "field_first_name": "John",
     "field_last_name": "Doe"
  }
  }]
  </code></pre>
  
  <p>So is there a way to group fields by the entity they are from?</p>