jabberwo

Canyou Set Data Using Js Array An Not Verbose Json?

Recommended Posts

I have large data sets to plot, it would be a lot more compact if I could put them into the transmitted HTML as a JavaScript array

 

"data": [30,26, etc...]

 

and not the much more verbose

 

"data": [

{

"value": "30"

},

{

"value": "26"

},

etc...

 

Having to massage the data into format using jQuery

 

$.map(dataArray, function(val,i) {return {"value": val};})

seems like a waist of development and render time:

 

 

Thanks,

Jab

Edited by jabberwo

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now