{
'ServerId': 'string',
'User': {
'HomeDirectory': 'string',
'SshPublicKeys': [
{
'DateImported': datetime(2015, 1, 1),
'SshPublicKeyId': '123'
},
{
'DateImported': datetime(2018, 1, 1),
'SshPublicKeyId': '456'
},
],
'UserName': 'string'
}
}
'SshPublicKeyId': '123'
'SshPublicKeyId': '456'
for public_key in dicta["User"]["SshPublicKeys"]:
print(f"'SshPublicKeyId': '{public_key['SshPublicKeyId']}'")
Output:
'SshPublicKeyId': '123'
'SshPublicKeyId': '456'