title: Django Rest Framework: How to modify output structure?
body: <p>Is there a way to group fields in Serializer/ModelSerializer or to modify JSON structure?</p>
  
  <p>There is a <code>Location</code> model:</p>
  
  <pre><code>class Location(Model):
      name_en = ...
      name_fr = ...
      ...
  </code></pre>
  
  <p>If I use <code>ModelSerializer</code> I get plain representation of the object fields like:</p>
  
  <pre><code>{'name_en':'England','name_fr':'Angleterre'}
  </code></pre>
  
  <p>I want to group some fields under "names" key so I get</p>
  
  <pre><code>{'names':{'name_en':'England','name_fr':'Angleterre'}}
  </code></pre>
  
  <p>I know I can create custom fields but I want to know if there is a more straightforward way. I tried</p>
  
  <pre><code>Meta.fields = {'names':['name_en','name_fr']...}
  </code></pre>
  
  <p>which doesn't work</p>