I am trying to use javascript to extract the bondInfo from a crystal loaded
into a JsMol applet. I want it as a JSON object or JSON string (either is
fine).
The script is:
var bondInfoObj = Jmol.scriptEcho(jsmol_handle, 'print getProperty(“JSON”,
“bondInfo”);’);
The problem is that it seems scriptEcho is evaluating the JSON and then
returning it as a string, so if I inspect bondInfoObj it is a string type
typeof(bondInfoObj)
returns “string”
and the value is:
“[Object object]”
Is there any way to get access to the actual javascript object or get the
JSON string as a string rather than as evaluated javascript?
-John
------------------------------------------------------------------------------
Slashdot TV. Video for Nerds. Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users