For scalar variables:
alert(alias);
console.log( JSON.stringify(alias));
alert(alias.zone_alias);
}
console.log(object);
For objects:
console.log( JSON.stringify(object) );
On caniuse.com you can view the browsers that support natively the
JSON.stringify
function:http://caniuse.com/json
You can also use the Douglas Crockford library to add
JSON.stringify
support on old browsers:https://github.com/douglascrockford/JSON-js
I hope this helps...
example
function(alias){ alert(alias);
console.log( JSON.stringify(alias));
alert(alias.zone_alias);
}
0 comments:
Post a Comment