author | Chloe Laisne <chloe.laisne@gmail.com> |
Tue, 18 Oct 2016 18:45:30 +0530 | |
changeset 356 | 139bf74b9374 |
parent 355 | 83f5247f3c7a |
permissions | -rw-r--r-- |
import DS from 'ember-data'; export default DS.Serializer.extend({ normalizeResponse: function(store, primaryModelClass, payload) { var data = []; Object.keys(payload['geostats']).forEach(function(key) { data.push({ 'id': key, 'type': 'geostat', 'attributes': { 'count': payload['geostats'][key] } }); }); return { 'data': data }; } });