选择特定的项目我有一个JSON对象,当我这样做:在JSON阵列
console.log(response.json);
我得到这个
{ results:
[ { address_components: [Object],
formatted_address: 'Google Bldg 42, 1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA',
geometry: [Object],
place_id: 'ChIJPzxqWQK6j4AR3OFRJ6LMaKo',
types: [Object] } ],
status: 'OK' }
我希望能够选择formated_address
作为一个例子。我试过console.log(response.json.formatted_address);
的变体,但我无法弄清楚。