I have the following json schema, where there can be several companies; each company has several departments and each department has several employees.
{
"type": "array",
"items": {
"type": "object",
"properties": {
"companyName": {
"type": "string"
},
"departments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"departmentName": {
"type": "array"
},
"status": {
"type": "string"
},
"employees": {
"type": "array",
"items": {
"type": "object",
"properties": {
"employeeName": {
"type": "string"
},
"employeeSurname": {
"type": "string"
},
"position": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
I also have a PostgreSQL DB that consists of tables. Is there any library that would take a dumped JSON file that follows the above-mentioned schema and insert or remove entries from the DB based on the information and relations in the dumped JSON?
For example, a new employee starts working in the IT department for the company X, and the information of this employee needs to be added to the db for that department of that company.