Search code examples
ember.jsember-dataember-cli

Ember serialize output response


I want the response to be in this format:

{"password"=>"[FILTERED]", "email"=>"admin@admin.com"}

However, this is the response that I'm getting now:

{"user"=>{"password"=>"[FILTERED]", "email"=>"admin@admin.com"}}

Code: https://github.com/ghoshnirmalya/hub-client

Any idea how to fix this?


Solution

  • Ember has serializes for exactly this purpose. You use its serialize method to format the response the way you want it. Take a look in ember docs