Py学习  »  Python

Python:提取和压缩json数据

coding • 3 年前 • 1404 次点击  

我有一个json结构:

[
{
    "title": "5280 Cafe At Rallysport",
    "streetAddress": "2727 29th St.",
    "addressLocality": "Boulder",
    "addressRegion": "CO",
    "postalCode": "80301",
    "phoneNumber": "720-526-1013",
    "vendorCuisine": "Breakfast"
},
{
    "title": "Ali Baba Grill Boulder",
    "streetAddress": "3054 28th St",
    "addressLocality": "Boulder",
    "addressRegion": "CO",
    "postalCode": "80304",
    "phoneNumber": "303-440-1393",
    "vendorCuisine": "Mediterranean"
}]

我想提取标题、街道地址、地址地点和邮政编码,最后为每一个都提供这种格式。

final_address = 5280 Cafe At Rallysport, 2727 29th St., Boulder , 80301

我不知道该怎么做。

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/130988
 
1404 次点击  
文章 [ 1 ]  |  最新文章 3 年前