Hi javascipt gurus,

I have a issue that is getting me frustrated I a large arrays of profiles. So I take the necessary arrays out of profile and add them to an small array called items. Then I want to take elements out of the new items array and place the string values into a select array the issue is the default if in the last for loop it will not work it only ever returns the entire string/ array. Any help would be great.


Code:
var select =[];

var profile = [];
profile["0"] = ['240','1','4','1','1','1','2.40','CR240'];
profile["1"] = ['360','3','5','1','1','1','3.60','CR360'];
profile["2"] = ['480','4','6','1','1','1','4.80','CR480'];

var items[];
var x= 0;
	
	for(var i=0;i<profile.length;i++){
		

		if(profile[i][2] == itemVar){
			
			 items[x]= hc_styleprofile[i];
			 
		x++;
		}

	}

alert(item[0]);

var defaultItem = 2;

	for(var i=0;i<item.length;i++){
		alert(item[i]);
		if(defaultItem == item[i]){
			select["default_size"]=items[i];
			select['default_size']);


		}
	
	}