I'm trying to access all brands and values for dropdown menu but I couldn't that with this way.
<select id="secim">
</select>
var data = [
{
"products": "Cars",
"brands_values" : [
{"brand":"fiat","value":1},
{"brand":"bmw","value":2}
]
}
];
$.each(data, function(i, item) {
$('#secim').append($('<option>', {
value: item.brands_values.value,
text: item.brands_values.brand
}));
});
How could I do? Thank you