Я использую Mongo Shell. Я должен попытаться объединить две коллекции, сопоставляя ' Birthnotes ' в movie3 и ' name ' в городах с регулярным выражением.
Мне нужнонайдите:
для каждого человека, место рождения которого известно, найдите широту, долготу и население этого города.
коллекция фильмов3:
{
"person-name": "Bell, William J.",
info: {
quotes: [
"My wife, 'Lee Phillip Bell' (qv) had her own television show in Chicago when I started doing serials. We both knew there were problems with security in the television business, so we promised each other that if one of us got fired, the other would quit his job and we'd go live in Europe for a year. Neither one of us were ever fired, and we've been working ever since."
],
trivia: [
"Father-in-law of 'Maria Arena Bell' (qv) and 'Colleen Bell (II)' (qv).",
"Said to have contributed to the writing of some 15,000 daytime TV soap-opera episodes.",
"Father of 'Lauralee Bell' (qv), 'William J. Bell Jr.' (qv), and 'Bradley Bell (I)' (qv)."
],
birthnotes: ["Chicago, Illinois, USA"],
birthdate: ["6 March 1927"],
deathdate: ["29 April 2005"],
spouse: [
"'Lee Phillip Bell' (qv) (October 1954 - 29 April 2005) (his death); 3 children"
],
birthname: ["Bell, William Joseph"],
books: [],
article: [],
deathnotes: [
"Los Angeles, California, USA (complications from Alzheimer's disease)"
]
}
}
коллекция городов:
{
name: "Sant Julià de Lòria",
country: "AD",
timezone: "Europe/Andorra",
population: 8022,
location: { longitude: 42.46372, latitude: 1.49129 }
},
{
name: "Pas de la Casa",
country: "AD",
timezone: "Europe/Andorra",
population: 2363,
location: { longitude: 42.54277, latitude: 1.73361 }
},
{
name: "Ordino",
country: "AD",
timezone: "Europe/Andorra",
population: 3066,
location: { longitude: 42.55623, latitude: 1.53319 }
}
Я сделал много попыток, но не могу сделать это вообще. Спасибо!