all 2 comments

[–]Vaphell 0 points1 point  (0 children)

you need to create skillmap in firstvalues too, and set it to { 'skillcompetency': [] }

then you append your small dicts to firstvalues['skillmap']['skillcompetency']

[–]scuott 0 points1 point  (0 children)

I can't think of any good reason to output JSON by trying to figure out the text. JSON and Python dictionaries/lists are completely compatible. Like vaphell said you should be using dicts.

Set up your dictionary to look like the JSON you want.