I'm trying to fill the dropdown with the value of 'startDate' from multiple json objects, how do I do this without also getting 'endDate' and 'price' to show up?
This is my current situation:

This is the code I'm using:
function get_months(year) {
selected_year = year;
date.style.visibility = 'hidden';
month.style.visibility = 'visible';
yearArray = dateType[year];
console.log(yearArray);
$.each(yearArray, function(key, value) {
$(month).append('<option value=' + value + '>' + key + '</option>');
});
}
function get_dates(month) {
date_selected = false;
if(current_type == 'Weekend') {
date.style.visibility = 'visible';
//console.log(current_customer, current_type, selected_year, month);
} else if(current_type == 'Midweek') {
date.style.visibility = 'visible';
//console.log(current_customer, current_type, selected_year, month);
} else if(current_type == 'Week') {
date.style.visibility = 'visible';
//console.log(current_customer, current_type, selected_year, month);
}
monthArray = yearArray[month];
console.log(monthArray);
alert(monthArray);
$.each(monthArray, function(key, value) {
//startDate = value.startDate;
console.log(value.startDate);
$.each(value, function(key2, value2) {
/* console.log(key2);
console.log(value2); */
$(date).append('<option value=' + key2 + '>' + value2 + '</option>');
});
});
}
If any other information is required, please ask! Thanks in advance!