473,406 Members | 2,369 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

concat multiple objects with JSON

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
Dec 10 '07 #1
1 6169
On Dec 10, 12:56 pm, Andrew Poulos <ap_p...@hotmail.comwrote:
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:objectRef 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.
--
Rob
Dec 10 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: sirsean | last post by:
Hi all. I'm trying to dynamically build menus and objects after my page loads. Data is stored in an XML file and is parsed at runtime into Javascript objects. At the moment, I'm working on creating...
15
by: Christopher Benson-Manica | last post by:
Is there a general mechanism to duplicate, or provide for the duplication of, objects? As an example, suppose I need to duplicate an array. I can accomplish this with array.slice( 0 ), but that's...
5
by: Alex D. | last post by:
is there any way to automatically convert .net objects to javascripts objects? for example to send the bussiness logic to the browser and this way reduce the postbacks to the server? I think it...
1
by: routeslip | last post by:
Hi. I'm pretty experienced with Javscript but totally new to JSON and have a question... Is it possible to use JSON to "populate" objects that are already defined? For instance, I have two...
2
by: adam | last post by:
I have a rather old script that uses XMLHttpRequest to retrieve some html and pops it into a div using innerHTML. I'd like to switch over to using append child since not only is it standardized,...
2
by: ChrisO | last post by:
I've been pretty infatuated with JSON for some time now since "discovering" it a while back. (It's been there all along in JavaScript, but it was just never "noticed" or used by most until...
2
by: holtmann | last post by:
Hi, I got a question regarding JSON as datasource- I understand that eval on a JSON String creates the appropriate objects in JS. But I would like to use JSON to supply data to already defined...
1
by: Andrew Poulos | last post by:
I've just added JSON handling to my work and the code from json.org to create/parse the strings. The "compressed" version of the code starts: if(!Object.prototype.toJSONString){Array... This...
8
by: vunet | last post by:
I'd like to perform multiple XMLHTTP requests but one after the other, ie. do next when previous one comes back ok. Identifier to determine when to start the next one is a global variable whose...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.