This is silly but I can't figure it out.
I have a simple object in JS:
var objSyntax = [ {"a": "1"},
{"b": "2" },
{"c": "3"} ];
I want to call 1 when theid is equal a, etc.
Here is the notation I tried which did not work:
objSyntax[theid];
What am I doing wrong?
"a"key. Or if the keys are guaranteed to be unique, you should probably make a single Objectvar objSyntax = {"a":"1", "b":"2", "c":"3"}