title: How to select only one element of associated objects in to_json / to_xml
body: <p>I have the following problem. My App (a prototype of an api) should be able to react on params (like language).
  I'm already able to respond to an request by sending an entierly object (with associated objects included) as JSON. But now i want to select the associated objects by parameter.
   my code:</p>
  
  <pre><code>object.to_json(include =&gt; {
     :texts_in_diff_languages =&gt; {
       #here i should be able to select only languages equal to a given parameter (params[:language])
     }
  })
  </code></pre>
  
  <p>Do you have any idea? Thanks!</p>