I'm trying to use to_json
to create a json file with python. I have it working so far to produce the following sort of output:
[
{
"Country": "A",
"Title": "B",
"Category": "C"
},
{
"Country": "D",
"Title": "E",
"Category": "F"
}
]
But I need it to create a json file that looks like this. Quite simply, to add the "data" name. Any tips on how to do so?
{
"data": [
{
"Country": "A",
"Title": "B",
"Category": "C"
},
{
"Country": "D",
"Title": "E",
"Category": "F"
}
]
}