One Pager Cheat Sheet

  • You can implement your own version of the JSON.parse() method, called parseJSON, that accepts one parameter and can return one of the following: array, object, string, number, boolean, or null.
  • By defining multiple if cases to check for null, empty objects, arrays or booleans and additional parsing of values inside quotes and brackets, we can create a JSON Parser in JavaScript.

This is our final solution.

To visualize the solution and step through the below code, click Visualize the Solution on the right-side menu or the VISUALIZE button in Interactive Mode.

JAVASCRIPT

That's all we've got! Let's move on to the next tutorial.

If you had any problems with this tutorial, check out the main forum thread here.