取出的api 格式是纯object格式
{"name":"james","city":"Taipei","country":"Taiwan"}
用ngFor跑表格跑不出来 因为不支援object格式
要怎么把他变成array格式?
想变成
json array [ {"name":"james","city":"Taipei","country":"Taiwan"} ]
let o = {"name":"james","city":"Taipei","country":"Taiwan"}let arr = [o]
返回Array
let addressPoints = response;for (const key in addressPoints) { if (addressPoints.hasOwnProperty(key)) { const a = addressPoints[key]; }}