Jrunscript has a 'print'
function. Yet it does not print anything useful about objects. For example:
js> var obj = {one:1, two:2}
When evaluating object Jrunscript
outputs just that:
js> obj
[object Object]
And 'print'
is no good as well:
js> print(obj)
[object Object]js>
What Jrunscript
functions can be used to print object structure?
use rhino+env.js:
http://www.envjs.com/
sample:
load('env.rhino.1.2.js');
var t1 = {// 10
"1" : {
"q0" : "q1",
},
"0" : {
"q1" : "q2"
}
};
print(JSON.stringify(t1));
Of course you get other useful stuff, but it helps you for the moment
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With