私はあなたがやろうとしているものに理解していません。 JSONからPython dictを作成したい場合、ansは "$ t"キーで値を取得します。ここではそうではありません(コメントではなく、私は答えを削除します)。
# Many thanks to Dogbert, whose answer I copied the list comprehension from
# (changing a few things), and many thanks to slothrop, whose answer gave me
# ideas for my variable name. Not for those people, I would have used a silly
# name like `thing` and would have used a for loop.
import json
nested_dict = json.loads('{"breed": [{"$t": "Chihuahua"}, '
'{"$t": "Jack Russell Terrier"}]}')
[dic["$t"] for dic in nested_dict["breed"]]
あなたのdict内部のすべての辞書のキーと値のペアが必要な場合:I:
key_and_value_pairs = []
for dic in nested_dict["breed"]:
key_and_value_pairs.extend(dic.items())
は似たものを試しましたが、私は常にエラー得るように見える「という文字列のインデックスは整数でなければなりません例外TypeErrorを」 – JonNewb