Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Louis Darby
Louis Darby
5,149 Points

Including JSON data from a https source into an Ember.js App

Hi there, I was wondering if you could help me with this problem.

I have a set of data that I have stored in JSON format for use in my Ember.js app. When I write the information straight into my index.js file (see below) it shows up however I want the data to be coming from an online source (public dropbox page) so that I can update it.

import Ember from 'ember';

export default Ember.Route.extend({
  model() {

var locations = [
{ etc etc etc.
}];

return locations;
}
});

```` 

Is it possible to retrieve this online JSON data to be used in my app?

Thank you!