PDA

View Full Version : Process JSON data before using a view



oregontarheel
20 Jun 2007, 8:36 AM
So I am loading a list of records from the server in JSON format and I would like to render using a View, but I need to clean up/process the data beforehand. This includes simple things like formatting dates, but also checking for existence of a child object, for example an array of attachments. if there are attachments present, I want to add an icon. I have been forced to just loop through a data store, and massage the data, then render a template. This works pretty well, but I'd like to leverage the built-in selection model of a view. Is there anything I can do short of just looping through the store, updating values and then passing that store to a view?