VI
const countries = {};
a.forEach(({ cities }) => {
cities.forEach(({ name, country }) => {
if (!countries[country.name]) countries[country.name] = {};
countries[country.name][name] = [];
});
});
Size: a a a
VI
const countries = {};
a.forEach(({ cities }) => {
cities.forEach(({ name, country }) => {
if (!countries[country.name]) countries[country.name] = {};
countries[country.name][name] = [];
});
});
VI
const countries = {};
a.forEach(({ cities }) => {
cities.forEach(({ name, country }) => {
if (!countries[country.name]) countries[country.name] = {};
countries[country.name][name] = [];
});
});
t
console.log(countries)
VI
console.log(countries)
t
VI
t
VI
t
countries[..][..] = [itemOfTheArray]
L
t
VI
countries[..][..] = [itemOfTheArray]
t
t
Y
L
L
clients
where 'login' = login ", function(err, results) {t
Y
Y
clients
where 'login' = login ", function(err, results) {