0
votes

I would like to combine two nested dictionaries that have a slight structure (one is a list of dictionaries and the other one is a nested dictionary). I would very much appreciate your help!

GPP_projects =
[{'CompanyId': 61149,
  'Id': 44,
 {'CompanyId': 61307,
  'Id': 45,}]

GPP_companies = 
{61149: {
  'Name': 'xyz',
  'CompanyId': 61149},
 61307: {
  'Name': 'abc',
  'CompanyId': 61307}}

#wanted outcome
GPP_combined =
[{'CompanyId': 61149,
  'Id': 44,
  'Name': 'xyz'}
 {'CompanyId': 61307,
  'Id': 45,
  'Name': 'abc'}}]