//map方法返回一个新的数组
let cityArr=this.data.CityList.map(n=>n.Dest_Airport_Cd)
let outStr=cityArr.join(',')+ "。"
遍历CityList,取出其中字段以分号分隔
json返回:
{
"Code": 200,
"BCode": 0,
"Msg": null,
"Data": {
"CityList": [
{
"_id": {},
"FFP_Nbr": 0,
"Dest_Airport_Cd": "string",
"dest_airport_cd_CNT": 0,
"dest_airport_cd_CNT_RN": 0
},
{
"_id": {},
"FFP_Nbr": 0,
"Dest_Airport_Cd": "weew",
"dest_airport_cd_CNT": 0,
"dest_airport_cd_CNT_RN": 0
},
{
"_id": {},
"FFP_Nbr": 0,
"Dest_Airport_Cd": "weew",
"dest_airport_cd_CNT": 0,
"dest_airport_cd_CNT_RN": 0
},
{
"_id": {},
"FFP_Nbr": 0,
"Dest_Airport_Cd": "grere",
"dest_airport_cd_CNT": 0,
"dest_airport_cd_CNT_RN": 0
}
],
}
}