简体   繁体   中英

Errror to parsing the data from Nested JSON format

Hello i'm quite newbie in python, really need a solution.

So, i've got the JSON data from marketplace website that contains all review data. But i want to get "reviewCreateTime" data only. I need to parse them.

This is the JSON data Tree:

在此处输入图像描述

this is my code:

items = []
for item in obj:
items.append(item['reviewCreateTime'])

在此处输入图像描述

But, i still have an error message

在此处输入图像描述

Can anyone solve this case?

can you try this

for item in obj["data"]["ProductReviewListQuery"]["list"]
    items.append(item["reviewCreateTime"])

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM