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 Node.js Basics (2014) Building a Command Line Application Getting the Response Body

Zakher Masri
Zakher Masri
4,415 Points

How can I copy the result in the console?

I would like to copy the body of the request so that I can paste it in any text editor to indent and organize the data to be read easily. The problem is that I could not highlight the text in the console and scroll in the same time. Any idea on how to copy the JSON code to the clipboard?

1 Answer

Zakher Masri
Zakher Masri
4,415 Points

Okay as I continued with the course I found the solution. I first typed the url: http://teamtreehouse.com/username.json in the address bar making sure the JSON extension is included. That will be a JSON file where the code is condensed. Then I copied that code and went to http://jsonprettyprint.com/ and pasted the code and it was automatically organized. Great!