title: How to take a dumped JSON and insert entries to PostgreSQL database
body: <p>I have the following json schema, where there can be several companies; each company has several departments and each department has several employees.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>{
    "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"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }</code></pre>
  </div>
  </div>
  </p>
  <p>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?</p>
  <p>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.</p>