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


Elinor Armsby
Elinor Armsby
13,663 Points

Can you bring JSON data into a vue.js object?

I just finished the vue.js basics course. Great course and I'm excited to try using some of what I learned on a couple projects I'm working on.

I'm guessing there is an easy way to do this since hard-coding the basic data into a js file is not very useful. Surely it's possible to use a JSON file to populate the data for the template?

Using the flashcards example from the course, I'd like to pull data from a database instead of the hard-coded "cards" object used in the course.

I've been searching online for hours trying to find a simple example of this but finding only examples that are so complex I can't really follow.