Obviously an object, but how to turn text into an object. Use eval(); note that parentheses must be added, otherwise the conversion will fail
- convert text to object
var test='{ colkey: "col", colsinfo: "NameList" }'
var obj2=eval("("+test+")");
alert(obj2.colsinfo);
- convert text to array
var test='["colkey", "col", "colsinfo","NameList" ]'
var obj2=eval("("+test+")");
alert(obj2.length);