A possibly useful JSON reader

So over on the slack group, a question was asked about reading the solutions downloaded from FCC. They are saved as JSON files, with the type “application/json”, and simply opening them up in an editor was leading to some confusion (newline characters and stuff).

So, when asked if there was a simple way of reading these, I did some research on the HTML5 File API, and found a codepen that I could extend. The one I found read text and displayed it, which was great, but I wanted to JSON.parse(...) the returned text, and get the content with the key index.js in that file.

So here it is, a simple JSON viewer specifically for your downloaded FCC lesson/challenge files! Here’s the codepen, and the comments should be pretty clear – message if there are questions!

1 Like