Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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!