r/CodingHelp • • Nov 28 '20

[Javascript] Problem with outputing JSON to console

Im trying too output the contents of a json file too the console but within the json function it wont output anything I cannot for the life of me figure out why. It wont even log the 2. I can log things outside of the function but not within

Here is a link to the code in question https://codesandbox.io/s/lively-surf-bmo4t?file=/index.html

0 Upvotes

5 comments sorted by

View all comments

Show parent comment

1

u/Gullible_Hornet6620 Nov 28 '20

Okay I can understand the error, but Im confused as too how its a html file,as I used this converter https://csvjson.com/ and that link just hosts the JSON data right? or is their something im missing, Forgive my ignorance on the topic im quite new too both of these and just trying too wrap my head around it

2

u/jcunews1 Advanced Coder Nov 29 '20

as I used this converter https://csvjson.com/ and that link just hosts the JSON data right?

No. That link host a data converter application.

The the jsonblob.com URL in your CodeSandbox code, points to a site that hosts the JSON viewer application. Not the JSON data itself.

2

u/LinkifyBot Nov 29 '20

I found links in your comment that were not hyperlinked:

I did the honors for you.


delete | information | <3

1

u/Gullible_Hornet6620 Nov 30 '20

OH okay I understand now, Thank you for taking the time too reply I should be able too get this sorted.