javascript / angular how to turn into object array

api format pure object extracted format

{"name":"james","city":"Taipei","country":"Taiwan"}

Run with ngFor run out because the object table format is not supported

How to turn him into array format?

I want to become

json array [ {"name":"james","city":"Taipei","country":"Taiwan"} ]
method

let o = {"name":"james","city":"Taipei","country":"Taiwan"}
let arr = [o]

https://segmentfault.com/q/1010000017148640

Guess you like

Origin www.cnblogs.com/TTonly/p/10974399.html