Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] How to add a record to a Json data object?
- From: rdong at advance.net (Roland Dong)
- Subject: [Javascript] How to add a record to a Json data object?
- Date: Sun Jun 26 18:49:48 2005
I have been trying to add a record the the following json data object using
javascript.
var jsonObj = {
"name":"horizontal navigation",
"menu": [
{"Label_1": "a", "url":"http://abc", "test":false },
{"Label_1": "b", "url":"http://cde", "test":false},
{"label_2": "e", "url":"http://fgh", "test":true},
{"label_2": "f", "url":"http://ijk", "test":false},
{"label_3": "g", "url":"http://lmn", "test":false},
{"label_4": "h", "url":"http:/opq", "test":false}
]
};
I want to add a record: {"label_4":"I", "url":"http://rst", "test":true} to
menu. How can I do it?
Thanks you.
- References:
- [Javascript] IE/win click detection, not on text
- From: dlovering@xxxxxxxxx
- [Javascript] IE/win click detection, not on text
- Prev by Date: [Javascript] IE/win click detection, not on text
- Next by Date: [Javascript] How implement drop-down list box values in asp with javascript-reg
- Previous by thread: [Javascript] IE/win click detection, not on text
- Next by thread: [Javascript] How to have the popup menu stay on?
- Index(es):