| author | Chloe Laisne <chloe.laisne@gmail.com> |
| Mon, 26 Sep 2016 20:49:10 +0200 | |
| changeset 298 | a915633aa6cf |
| parent 284 | 12448de16a63 |
| child 319 | 78990a8a069b |
| permissions | -rw-r--r-- |
import DS from 'ember-data'; export default DS.Serializer.extend({ normalizeResponse: function(store, primaryModelClass, payload) { var data = []; Object.keys(payload).forEach(function(key) { data.push({ 'id': key, 'type': 'geostat', 'attributes': { 'count': payload[key] } }); }); return { 'data': data }; } });