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 2017 Building a Command Line Application Getting the Response Body

Why make object to string?

At 4.06 Andrew says when make it object by parsing string? Why do we need to make it object while we already have string?

Steven Parker

1 Answer

Steven Parker
Steven Parker
216,151 Points

:bell: Hi, I got alerted by your tag.

The string contains the representation of an object that was previously converted into a string to simplify transmission. The purpose for parsing it is to convert it back into an object so the internal properties can be accessed.

This all might make a bit more sense after you see the next video.