title: Mongo Aggregation to replace an empty / null array field inside an array with a default array
body: <p>I have a collection like below</p>
  
  <pre><code>{
      relatedProperties: [ //Array
         {
              locations: [ //Array 
                  {
                      value: "Brazil"
                  },
                  {
                      value: "Germany"
                  }
              ]
         },
         {
              locations: []
         },
         {
              locations: null
         }
      ]
  }
  </code></pre>
  
  <p>How do I write an aggregation to make only the empty or null arrays to have a default value like;</p>
  
  <pre><code>locations: [  
                  {
                      value: "India"
                  }
             ]
  </code></pre>