I have exposed to Backbone an API that returns user profiles with this structure:
{id: 1, following: {…}}. I only want to use the dictionary inside of the “following” attribute. How would I do that? Right now, I have a model with a URL to the API. I have a collection that uses this model. I do a fetch() on the collection, but I only want to use the dictionary inside of “following”.
I have exposed to Backbone an API that returns user profiles with this structure:
Share
You should use
parseto extract what you want from the the response:So you’d want something like this in your model: