我向服务器发出请求get并获得 json 格式的响应。response.data看起来像这样:[ { "name": "mike", "password": "2345", "old": "12" }, { "name": "5c251688a3df283bb8630cc6", "password": "2345", "old": "12"}, { "name": "John", "password": "2345", "old": "20" ].如何显示,例如,所有的名字,或所有的密码等。这是方法本身:
getPerson: function() {
const url = 'http://localhost:8080/api/names'
axios.get(url, {
dataType: 'json',
'Access-Control-Allow-Origin': 'localhost:8080',
'Access-Control-Allow-Methods': 'GET,PUT,POST,DELETE' })
.then(response => {
return (this.info = response.data)
})
所以呢