Closed FokkeZB closed 11 years ago
not a bad idea. Can you show me such a function. Just to test this out?
I use it to read a complex Google Calendar JSON feed:
nice. seems flexible.
you have time, I could be great with an example for the repo..
Here you are:
parentNode: function (data) {
var entries = [];
_.each(data.feed.entry, function (_entry) {
var entry = {};
entry.id = _entry.id.$t;
entry.startTime = _entry.gd$when[0].startTime;
entry.endTime = _entry.gd$when[0].endTime;
entry.title = _entry.title.$t;
entry.content = _entry.content.$t;
entries.push(entry);
});
return entries;
}
thanks for the example code. I bet that will help people out :+1:
Allowing for more advanced traversion (e.g. nested properties)