How to create { " key1" : {“keyChild”: “value” } } output
How can I create
{ " key1" : {“keyChild”: “value” } } output
where key1 is dynamic
example:
the goal, dictionary object
{
“DER”: {
“shorts”: “DER”,
“longs”: “Distributed Energy Resources”,
“details”: “”
},
"ABC": {
"shorts": "ABC",
"longs": "Albania Broadcasting Company",
"details": ""
}
}
what I could do now, just array of objects
[{
“shorts”: “DER”,
“longs”: “Distributed Energy Resources”,
“details”: “”
},
{
“shorts”: “ABC”,
“longs”: “Albania Broadcasting Company”,
“details”: “”
}
]