こんにちは、私は次のような構造でJSONを解析しようとしています:私は私ができませんでしたJSONを解析初心者ですのでjsonから次の2つのリストを取得するには?
{"Question":["what is this?","this is another question"], "Topic": ["Web pages","another topic"]}
私は2つのリスト、
questions=["what is this?","this is another question"]
topics=["Web pages","another topic"]
を取得したいと思い試してみました:
>>> with open('stack.json','r') as f:
... data = json.load(f)
...
>>> for element in data:
... print(element)
...
は、しかし、私はちょうど得た:
Question
Topic
私は前の2つのリストを取得するためにサポートを感謝したいと思います。
data.valuesの要素のための['what is this?', 'this is another question']
['Web pages', 'another topic']
'()::' – AChampion