author | ymh <ymh.work@gmail.com> |
Fri, 02 Dec 2016 00:22:31 +0100 | |
changeset 454 | 710a2ae08a74 |
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 }; } });