如何使用此处的反向地理编码从所有检索到的数据中获取城市名称?

How can I get the name of the city from all the retrieved data using here reverse-geocoding?

我正在使用 here 反向地理编码功能,控制台下方的代码会打印一个对象,其中包含我所在位置的所有信息。我只想知道我所在城市的名称。我怎样才能做到这一点?。谢谢! (在我的代码中,我给 "platform" 变量赋了一个值。)

var geocoderService = platform.getGeocodingService();
  if (navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(position =>{
      geocoderService.reverseGeocode(
        {
          mode: 'retrieveAddress',
          maxresults: 1,
          prox: position.coords.latitude + ', ' + position.coords.longitude
        },
        success => {
          console.log(success.Response);
        },
        error => {
          console.log(error);
        }
      );
    });
  } else {
    console.log('Not working.')

  }

您可以通过在代码中写入 success.Response.View[0].Result[0].Location.Address.City 来获取该信息。