Open dottodot opened 10 years ago
I'm having the same issue. App crashes on fetch when I do...
_.each(collection.models, function(element, index, list){
Ti.API.info(element);
});
I'm just trying to figure out how to access my data in 'element'.
If I remove the Ti.API.info, the app does not crash.
What about: Ti.API.info(JSON.stringify(element)); ?
Ti.API.info(JSON.stringify(element)); will not crash the app and I can see my data.
What's odd is that I can get element.id (the id generated by restapi.js) but I cannot access any other data in my JSON. element.LibraryCategoriesTitle, for example, just returns
Ah, I figured it out by reading https://developer.appcelerator.com/question/153642/empty-collection-after-fetch.
It's element.attributes['LibraryCategoriesTitle'].
Sheesh!
Thanks, it was due to not using JSON.stringify
Not too sure is this issue is for here but thought I'd start her anyway.
When my app launches it immediately crashes and closes with no error.
Model
Fetch Collection
If I remove