I have a solution now, but it's not the best I think.
function parseEval(value){
var result = undefined;
try {
result = eval(value);
} catch (e) { }
return result;
}
So if the value is undefined or contains uninterpretable value the function return undefined.
If contains an existing function name than returns function object
if contains "[1,2,3]" then return int array
if contains "[{ label: "Choice1", value: "value1" },{ label: "Choice2", value: "value2" }]" then return an array of objects
I'm open for any solution because the eval has lot of disadvantages. (performance, security, flexibility, maintainability)
JSON.parse()like everyone else?