In other words, using a JSON dataset looking like:
we could access the “status” value by simply entering:
However, if we tried the same thing with the “message-data” key, you will note that this will fall over syntactically straight away – all because of that silly hyphen (dash).
So the way around this?
Well you basically have to revert to the long notation format to get at the data associated with these keys, meaning that you would now need to do something like this:
And now you know.