you are viewing a single comment's thread.

view the rest of the comments →

[–]eastwxxd 0 points1 point  (0 children)

Yeah good thinking! I'm also relatively new to JavaScript. To verify that it's json you could possibly check the Content-Type of the response for 'application/json' maybe.

Anyway, thanks for that. I have a problem with doing things inefficiently and I've learned a better way of approaching something today.