while (i <= 10) {
const result = await get_results(dataObject[i].id);
i++;
}
http://site.test/checkout/5?datetimes=27+Oct%2C+2022+-+29+Oct%2C+2022&date_start=10%2F27%2F2022&date_end=10%2F29%2F2022&cost_per_night=200.00
http://site.test/checkout/5?datetimes=27+Oct%2C+2022+-+29+Oct%2C+2022&date_start=10%2F27%2F2022&date_end=10%2F29%2F2022&room_id=2
Object.keys(jsonKey).each(key => {
const value = jsonKey[key];
$(`.${key}`).html(value);
})
+------------+-------------+------------+----------+
| company_id | day_of_week | start_time | end_time |
+------------+-------------+------------+----------+
| 1 | 0 | 09:00 | 18:00 |
| 1 | 1 | 09:00 | 18:00 |
+------------+-------------+------------+----------+
+------------+-------------+-------------+-----------+
| company_id | day_of_week | start_break | end_break |
+------------+-------------+-------------+-----------+
| 1 | 0 | 12:00 | 12:30 |
| 1 | 0 | 15:30 | 15:55 |
+------------+-------------+-------------+-----------+
const array = [
{ from: "С.Петербург", to: "Минск" },
{ from: "Киев", to: "Новосибирск" },
{ from: "Череповец", to: "Москва" },
{ from: "Минск", to: "Киев" },
{ from: "Москва", to: "С.Петербург" }
];
const cities = {};
const result = [];
const getNextDestanation = (destatnation, array) => {
for (const i of array) {
if (i.from === destatnation) return i;
}
}
const checkCity = (city) => {
if (cities[city]) cities[city]++;
else cities[city] = 1;
}
array.map(i => {
checkCity(i.from);
checkCity(i.to);
});
const firstCandidates = Object.keys(cities).filter(c => cities[c] === 1);
const firstElement = array.find(i => firstCandidates.includes(i.from));
result.push(firstElement);
for (let i = 1; i < array.length; i++) {
result.push(getNextDestanation(result[i - 1].to, array));
}
//result будет результатом
ImportError: Your Python version 3.6.9 is not supported by aiogram, please install Python 3.7+