嗨,我是 json 的新手。我正在尝试将 json 文件解析为网页,就像在这个线程中解释的那样......
但是,我的 json 文件是一大堆联系人,这些联系人不在上面示例中的“人”之类的数组中。相反,我的 json 文件的前 6 行如下所示。
{ "first_name": "Tom", "last_name": "Moore", "phone": "123456", "email": "tom@abc.ie" }
{ "first_name": "Fred", "last_name": "Power", "phone": "197412", "email": "fred@abc.ie" }
{ "first_name": "Ann", "last_name": "Doyle", "phone": "836547", "email": "ann@abc.ie" }
{ "first_name": "Phil", "last_name": "Jones", "phone": "927481", "email": "phil@abc.ie" }
{ "first_name": "Jane", "last_name": "Ross", "phone": "993377", "email": "jane@abc.ie" }
{ "first_name": "Tom", "last_name": "Moore", "phone": "123456", "email": "tom@abc.ie" }
我怎样才能遍历它们以像上面的线程一样显示?提前谢谢了。