我正在使用Foursquare的场所搜索API,并且一切正常。但是响应中不包含街道号和街道地址的单独字段。它包含一个名为“地址”的字段,其中包含两个字段,如下面的示例
"location": {
"address": "180 Orchard St",
"crossStreet": "btwn Houston & Stanton St",
"lat": 40.72173744277209,
"lng": -73.98800687282996,
"labeledLatLngs": [
{
"label": "display",
"lat": 40.72173744277209,
"lng": -73.98800687282996
}
],
"distance": 8,
"postalCode": "10002",
"cc": "US",
"city": "New York",
"state": "NY",
"country": "United States",
"formattedAddress": [
"180 Orchard St (btwn Houston & Stanton St)",
"New York, NY 10002",
"United States"
]
我需要分别输入街道编号和街道名称。无论如何,有没有得到使他们分开的回应?还是唯一的方法就是我解析它?