-3

I have a dict that has a nested list which contains some sort of nested dict. I would like to append that nested dict

the orginal dict is as below

{
 'profileName': [
                {
                        '_value_1': 'ESMA_UDP',
                        'uuid': '8c18dd73-5fb5-357c-495d-66b09b820881'
                }, 
        {
                '_value_1': 'LDESCAMP_8845-udp',
            'uuid': '0e73cfad-4b32-5d5a-6b21-9069d647121d'
        }
                ]
}

the appended dict would be as below

{
 'profileName': [
                {
                        '_value_1': 'ESMA_UDP',
                        'uuid': '8c18dd73-5fb5-357c-495d-66b09b820881'
                }, 
                {
                '_value_1': 'LDESCAMP_8845-udp',
            'uuid': '0e73cfad-4b32-5d5a-6b21-9069d647121d'
        },
        {
                '_value_1': 'NEW_8845-udp',
            'uuid': '345534ad-4b32-5d5a-6b21-9069d647121d'
        }
                ]
}

1 Answers1

1

i think you are looking for something like this

dict_name['profile_name'].append({
                '_value_1': 'NEW_8845-udp',
                'uuid': '345534ad4b32...'
                })
Piakkaa
  • 740
  • 6
  • 12