Go Back   CodingForums.com > :: Client side development > JavaScript programming > DOM and JSON scripting

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-08-2010, 11:15 PM   PM User | #1
TonyL
New to the CF scene

 
Join Date: Oct 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
TonyL is an unknown quantity at this point
Convert JSON to a Multilevel Bulleted List Using JS

Can some one help me make the following JSON data:

Code:
{
	"main": {
		"label":"Main",
		"url":"#main"
	},
	"project": {
		"label":"Project",
		"url":"#project"
	},
	"settings": {
		"label":"Settings",
		"url":"#settings",
		"subnav":[
		{
			"label":"Privacy",
			"url":"#privacy"
		},
		{
			"label":"Security",
			"url":"#security"
		},
		{
			"label":"Advanced",
			"url":"#advanced"
		}
		]
	}
}
into the following bullets list using JS? Assuming you don't know what the first nodes are call labeled (e.g. "main", "project" <- these will be dynamically generated):
  • Main (#main)
  • Project (#project)
  • Settings (#settings)
    • Privacy (#privacy)
    • Security (#security)
    • Advanced (#advanced)

Thanks
TonyL is offline   Reply With Quote
Reply

Bookmarks

Tags
javascript, json

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:40 AM.


Advertisement
Log in to turn off these ads.