concat multiple objects with JSON

A

Andrew Poulos

I'm building some e-learning that's managed by an learning management
system (LMS). The LMS allows only one "field" for me to store custom
lesson data. The e-learning currently uses a number of separate
javascript objects.

How can I concatenate them into one object (to JSON string them to then
feed them to the LMS) and then to later parse the JSON string back into
the original multiple objects?

Andrew Poulos
 
R

RobG

I'm building some e-learning that's managed by an learning management
system (LMS). The LMS allows only one "field" for me to store custom
lesson data. The e-learning currently uses a number of separate
javascript objects.

How can I concatenate them into one object (to JSON string them to then
feed them to the LMS) and then to later parse the JSON string back into
the original multiple objects?

If your objects have names, then bundle them in an object using
name:eek:bjectRef pairs. Convert the object to JSON text.

To retrieve the objects, convert the JSON into an object (usually by
eval'ing it), then pull your individual objects back out.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,787
Messages
2,569,630
Members
45,335
Latest member
Tommiesal

Latest Threads

Top