title: MongoDb extract array
body: <p>I have a mongodb which I want to extract some specific data.
  Here is my json:</p>
  <pre><code> {
      &quot;jobs&quot; : [
          {
              &quot;id&quot;: 554523,
              &quot;code&quot;: &quot;1256-554523&quot;,
              &quot;name&quot;: &quot;Banco de Talentos&quot;,
              &quot;status&quot;: &quot;published&quot;,
              &quot;type&quot;: &quot;vacancy_type_effective&quot;,
              &quot;publicationType&quot;: &quot;external&quot;,
              &quot;numVacancies&quot;: 1,
              &quot;departmentId&quot;: 108141,
              &quot;departmentName&quot;: &quot;FUTURAS OPORTUNIDADES&quot;,
              &quot;roleId&quot;: 169970,
              &quot;roleName&quot;: &quot;BANCO DE TALENTOS&quot;,
              &quot;createdAt&quot;: &quot;2020-10-30T12:23:48.572Z&quot;,
              &quot;updatedAt&quot;: &quot;2020-12-30T23:21:30.403Z&quot;,
              &quot;branchId&quot;: null,
              &quot;branchName&quot;: null
          },
          {
              &quot;id&quot;: 616834,
              &quot;code&quot;: &quot;1256-616834&quot;,
              &quot;name&quot;: &quot;YYYYYY (o)  YYYYY&quot;,
              &quot;status&quot;: &quot;frozen&quot;,
              &quot;type&quot;: &quot;vacancy_type_effective&quot;,
              &quot;publicationType&quot;: &quot;external&quot;,
              &quot;numVacancies&quot;: 1,
              &quot;departmentId&quot;: 109190,
              &quot;departmentName&quot;: &quot;TESTE TESTE&quot;,
              &quot;roleId&quot;: 165712,
              &quot;roleName&quot;: &quot;SL - TESTE PL&quot;,
              &quot;createdAt&quot;: &quot;2020-12-16T14:17:36.187Z&quot;,
              &quot;updatedAt&quot;: &quot;2021-01-29T17:08:43.613Z&quot;,
              &quot;branchId&quot;: 120448,
              &quot;branchName&quot;: &quot;TESTE TESTE1&quot;
          }
      ],
      &quot;application&quot;: [
          {
              &quot;id&quot;: 50707344,
              &quot;score&quot;: 40.251965332031254,
              &quot;partnerName&quot;: &quot;indeed&quot;,
              &quot;endedAt&quot;: null,
              &quot;createdAt&quot;: &quot;2020-12-21T11:21:30.587Z&quot;,
              &quot;updatedAt&quot;: &quot;2021-02-18T22:02:35.866Z&quot;,
              &quot;tags&quot;: {},
              &quot;candidate&quot;: {
                  &quot;birthdate&quot;: &quot;1986-04-04&quot;,
                  &quot;id&quot;: 578615,
                  &quot;name&quot;: &quot;TESTE&quot;,
                  &quot;lastName&quot;: &quot;TESTE TESTE&quot;,
                  &quot;email&quot;: &quot;teste@teste.com.br&quot;,
                  &quot;identificationDocument&quot;: &quot;34356792807&quot;,
                  &quot;countryOfOrigin&quot;: &quot;BR&quot;,
                  &quot;linkedinProfileUrl&quot;: &quot;teste&quot;,
                  &quot;gender&quot;: &quot;female&quot;,
                  &quot;mobileNumber&quot;: &quot;+5511972319799&quot;,
                  &quot;phoneNumber&quot;: &quot;(11)2463-2039&quot;
              },
              &quot;job&quot;: {
                  &quot;id&quot;: 619713,
                  &quot;name&quot;: &quot;XXXXde XXXX Pleno&quot;
              },
              &quot;manualCandidate&quot;: null,
              &quot;currentStep&quot;: {
                  &quot;id&quot;: 3527370,
                  &quot;name&quot;: &quot;Cadastro&quot;,
                  &quot;status&quot;: &quot;done&quot;
              }
          },
          {
              &quot;id&quot;: 50707915,
              &quot;score&quot;: 3.75547943115234E+1,
              &quot;partnerName&quot;: &quot;indeed&quot;,
              &quot;endedAt&quot;: null,
              &quot;createdAt&quot;: &quot;2020-12-21T11:31:31.877Z&quot;,
              &quot;updatedAt&quot;: &quot;2021-02-18T14:07:06.605Z&quot;,
              &quot;tags&quot;: {},
              &quot;candidate&quot;: {
                  &quot;birthdate&quot;: &quot;1971-10-02&quot;,
                  &quot;id&quot;: 919358,
                  &quot;name&quot;: &quot;TESTE TESTE&quot;,
                  &quot;lastName&quot;: &quot;SILVA&quot;,
                  &quot;email&quot;: &quot;teste.teste@teste.com&quot;,
                  &quot;identificationDocument&quot;: &quot;3232323232&quot;,
                  &quot;countryOfOrigin&quot;: &quot;BR&quot;,
                  &quot;linkedinProfileUrl&quot;: &quot;teste/&quot;,
                  &quot;gender&quot;: &quot;female&quot;,
                  &quot;mobileNumber&quot;: &quot;11 94021- 5521&quot;,
                  &quot;phoneNumber&quot;: &quot;+5511995685247&quot;
              },
              &quot;job&quot;: {
                  &quot;id&quot;: 619713,
                  &quot;name&quot;: &quot;Analista de XXXXX Pleno&quot;
              },
              &quot;manualCandidate&quot;: null,
              &quot;currentStep&quot;: {
                  &quot;id&quot;: 3527370,
                  &quot;name&quot;: &quot;Cadastro&quot;,
                  &quot;status&quot;: &quot;done&quot;
              }
          }
      ]
  }
  </code></pre>
  <p>My question is: How can I extract only the array objects in <code>jobs</code> and <code>application</code> separately? Anyone knows the code in Mongodb for do this?
  I need do this task for after I can insert the extract separated data in different collections.</p>
  <p>Thanks a lot.</p>