I want to create the following JSON object, as seen from a console log:
Object
. member: Object
. id: 8286
I’ve been trying:
'member' :[{'id': 8286}]
but get the following error: “Uncaught SyntaxError: Unexpected token :”
What am I doing wrong? Thanks
this allows you to access it like
You could have also meant something like:
which you would access like so:
If this is not what you want, please clarify in your post cause I’m not sure I’m following your request correctly.