Any tips for converting CSV to Json?  I have CSV, row deliminted \n, and 
fields delimited with typical comma.  There is a known/exisiting object type 
for each field.  Something like:

{'fields': [{'field':'fname', 'col':2}, {'field':'ssn', 'col':5}]}

So I have that to work from, and will populate a Json result like this:
[{'data':{'fname':value}, {'ssn':value}},{'data':{'fname':value}, 
{'ssn':value}}]

I feel like I am doing it the long way when I:

// split csv string by \n to new line array

// for every item in new line split string

// split item by , to field array

// for every item in field array

// create object to add to new data array

Any ideas would help.

Thanks,
Karl..

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/prototype-scriptaculous/-/XmKNhm0qQ7oJ.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to