我需要从3个Mongodb集合中检索数据:
度假村和机场的json文档数组,匹配搜索字符串:
度假村有一个json对象,一个用于机场,一个用于城市。
json文档将包含类别的名称(度假村,机场,city_name)以及一系列匹配的度假村/机场。
请求映射:/api/destination/resortairport/Lon
参数:Lon
回应:
[ {type: "airport", "airport":
[
{"airportcode":"LCY", "airportname": "London City Airport"},
{"airportcode":"LHR", "airportname": "London Heathrow"},
{"airportcode":"LTN", "airportname": "London Luton"}
]},
{type: "resort", "resort":[
{"resortname": "London E Postcodes", "indexid":26447},
{"resortname": "London W Postcodes", "indexid":26448},
{"resortname": "London N Postcodes", "indexid":26449},
{"resortname": "London S Postcodes", "indexid":264450}
]}]