Fetch怎么获取返回值啊

c就是我需要的数据,我在外面用了country兜着

img


console.log(country) 结果是:

img


这样的
我怎么获取到具体的城市名啊
我的预期是['不丹','德国','巴黎','天津', 等等 ]之类的

country.push(c) 改为 country = c

country[0]

可以用async/await,示例如下:

const getCountry = async () => {
  const res = await fetch("url", {
    method: "POST",
    headers: {
      "Content-Type": "application/json;charset=utf-8",
    },
  });
  const { code, msg, data } = await res.json();
  console.log("data", data);
};
getCountry();