s
Вот так я вывел регионы:
{{#regionsCities}}
{{#each region}}
<option value="{{ this }}"> {{ this }} </option>
{{/each}}
{{/regionsCities}}а вот как вывести города в зависимости от того какая область выбрана, я не могу придумать
Size: a a a
s
{{#regionsCities}}
{{#each region}}
<option value="{{ this }}"> {{ this }} </option>
{{/each}}
{{/regionsCities}}s
s
L
s
L
s
AS
const regionsCities = {};
await Promise.all(
regions.map(async (region) => {
const cities = await univerModel.find({ region }).distinct("city");
regionsCities[region] = cities;
})
);s
AS
s
AS
s
AS
s
s
const regionsCities = {};
await Promise.all(
regions.map(async (region) => {
const cities = await univerModel.find({ region }).distinct("city");
regionsCities[region] = cities;
})
);AS
s
AB
KM