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
https://forums.phpfreaks.com/topic/193026-reading-an-object/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.