How to use Javascritp only to populate Object with Ajax Get request response text?

Yes I was and I have come across situations where wrapping it in an array caused problems too - but I can’t remember where I saw that now it was a while ago.

Checking section 15.12.1.2 of the standards (and not just relying on a third party source such as MDN which has been known to have errors in it) it appears that objects and arrays are not all that JSON can consist of.

So I have learnt something new about JSON today.

1 Like