I have to prepare JSON files to send using POST, but I have faced the following format to handle:
offer {
"location":
{
"city": "Kharkov",
"address": "street"
}
"dates": [
{
"start_date": "2018-10-10 14:00",
"end_date": "2018-11-11 14:00"
}]
}
Before it, to set the Value for the city field I used the following implementation:
offer['location']['city'] = "Kharkov"
But now I can't figure out how to add the value to the key start_date since the dictionary is inside the list.