Jump to content

Reading an object


The Little Guy

Recommended Posts

I found this on a site, and was wondering how do you read the values?

 

I want to populate one select box with all the "Make" items, and when someone selects a make then it populates a second box with the Models.

 

How do I read each one? is it like reading an array?

 

var obj_make_model = [
{
	"Make":"other",
	"Models":["other"]
},
{
	"Make":"AC",
	"Models":["other",
	"Cobra"]
},
{
"Make":"Acura",
	"Models":["other",
	"1.6 EL",
	"1.7 EL",
	"2.3 CL",
	"2.5 TL",
	"3.0 CL",
	"3.2 TL",
	"3.5 RL",
	"CL",
	"CSX",
	"EL",
	"Integra",
	"Legend",
	"MDX",
	"NSX",
	"NSX-T",
	"RDX",
	"RL",
	"RSX",
	"SLX",
	"TL",
	"TSX",
	"Vigor"]
},

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.