前提
実現したいこと
PythonでAPIを叩いた後の戻りデータ(dict)から必要なデータを取り出したいです。
forを使って色々と試行錯誤しているのですが、データが抜き出せないです。
お手数をおかけしますが。ご教示いただければ幸いです
戻り値
{ 'Users': [ { 'Username': '1111-1111', 'Attributes': [ { 'Name': 'sub', 'Value': 'snip' } ], 'UserCreateDate': datetime.datetime(2022, 7, 14, 2, 37, 17, 978000, tzinfo=tzlocal()), 'UserLastModifiedDate': datetime.datetime(2022, 7, 14, 2, 37, 17, 978000, tzinfo=tzlocal()), 'Enabled': True, 'UserStatus': 'OK' }, { 'Username': '2222-2222', 'Attributes': [ { 'Name': 'sub', 'Value': 'snip' } ], 'UserCreateDate': datetime.datetime(2022, 6, 24, 7, 10, 55, 551000, tzinfo=tzlocal()), 'UserLastModifiedDate': datetime.datetime(2022, 6, 24, 7, 10, 55, 880000, tzinfo=tzlocal()), 'Enabled': True, 'UserStatus': 'OK' } ], 'ResponseMetadata': { 'RequestId': 'snip', 'HTTPStatusCode': 200, 'HTTPHeaders': { 'date': 'Thu,14Jul202204:08:17GMT', 'content-type': 'application/x-amz-json-1.1', 'content-length': '461', 'connection': 'keep-alive', 'x-amzn-requestid': 'snip' }, 'RetryAttempts': 0 } }
出力したいデータ
UsersのUsernameの値 UsersのUserCreateDateの値
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。