I have a json object I am querying in jquery and having trouble using the values stored in jquery variables. Example:
$tops= json.tops
$color = "blue";
If I console.log($tops.blue);
I get the expected result. But, if I console.log($tops.$color);
I get 'undefined'
.
Can anyone explain what I am doing wrong/what the difference is?