My json to create a record in mongodb is as follows:
{
'timestamp': {
'elasticsearch': {
'backup_status': 'string',
'backup_folder': 'string',
},
'mongodb': {
'backup_status': 'string',
'backup_folder': 'string',
},
'postgresdb': {
'backup_status': 'string',
'backup_folder': 'string',
},
'overall_backup_status': 'string',
},
};
Here the key "timestamp" holds a different value each time, I would like to make this field unique. I have tried check various documentations where I see examples on how to make a field unique by its name but here the field I need to make unique does not have name.