JSON is simply a serialisation format that uses a text-based subset of JavaScript in a string - using objects in JavaScript isn't JSON (name of it I admit is slightly confusing, to say the least).
To do what you want, simply use the square bracket notation:
console.log(data[param]);
It allows any expression to be placed into it and the return value will be converted into a string, then used to access the property on the object - this allows variables such as param
to be used dynamically.
For example, here are some results which occur when you're using the square bracket notation:
var foo =
{ '[object Object]': 1
, bar: 2 };
var x = "bar";
foo[{}]; // 1
foo['[object Object]']; // 1
foo.[object Object]; // SyntaxError: Unexpected token [
foo[bar]; // ReferenceError: bar is not defined
foo.bar; // 2
foo["bar"]; // 2
foo[x]; // 2
foo.x; // undefined