Help with js. I have two selects that earn them with nested list dictionaries. I don’t know how to write a script so that when choosing a brand it would be possible to select only the selected brand, after choosing send a request with the brand and model of the car
<form action="" method="post" id="dynamic_selects">
<div class="row">
<select class="form-select" aria-label="Default select example" id="marka">
<option value="0">Select auto</option>
{% for car in marka_sorted %}
<option value={{ car }}>{{ car }}</option>
{% endfor %}
</select>
</div>
<div class="row">
<select class="form-select" aria-label="Default select example" id="model" disabled>
<option value="0">Select model</option>
{% for marka, model in marka_sorted.items %}
{% for model_select in model %}
<option value={{ model_select }} class={{ marka }}>{{ model_select }}</option>
{% endfor %}
{% endfor %}
</select>