You need to use the comprehension to define the filenames as fields of the object you're building:
jsonnet -m . -e "local files = ['a.txt', 'b.txt']; { [file]: 'The content of %s' % file for file in files }"
Also if you know that config is a field of checkConfig then you can just do checkConfig[config], you don't need std.get.
I think what you want to write is something like:
{
[filename]: { Config: std.mergePatch(std.mergePatch(checkConfig[filename], dynamicConfig), staticConfig) }
for filename in std.objectFields(checkConfig)
}