Created
April 29, 2012 00:11
-
-
Save derfarg/2522833 to your computer and use it in GitHub Desktop.
JS Array Converter to JSON (YUI)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var JSArray = ["item1","item2","item3"]; | |
var json = {}; | |
for(i in tree){ json[i] = tree[i]; } | |
json = YAHOO.lang.JSON.stringify(json); | |
//dependecies | |
//http://yui.yahooapis.com/2.9.0/build/yahoo/yahoo-min.js" | |
//http://yui.yahooapis.com/2.9.0/build/json/json-min.js" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment