Skip to content

Instantly share code, notes, and snippets.

@knownasilya
Last active January 1, 2016 18:59
Show Gist options
  • Save knownasilya/8187100 to your computer and use it in GitHub Desktop.
Save knownasilya/8187100 to your computer and use it in GitHub Desktop.
ProviderSerializer
App.ProviderSerializer = App.ArcGisSerializer.extend({
extractArray: function (store, type, payload, requestType) {
var modifiedPayload = {
providers: payload
};
return this._super(store, type, modifiedPayload, requestType);
},
normalizeHash: {
providers: function (hash) {
var modifiedHash;
hash = hash.attributes;
modifiedHash = {
id: hash.OBJECTID,
name: hash.ProvName,
technology: hash.TransTech,
downloadSpeed: hash.MaxAdvDown
};
return modifiedHash;
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment