title: Replace base64 images by uploaded urls of a nested object
body: <p>I have data like this:</p>
  <pre><code>const currentData = {
    id: &quot;u76u76h&quot;,
    type: &quot;cardA&quot;,
    name: &quot;Section 1&quot;,
    thumbnail: {
      src: &quot;&quot;,
      alt: &quot;&quot;,
    },
    data: {
      avatar: {
        dataType: &quot;image&quot;,
        src: &quot;data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEBXgFy56y56y56&quot;,
        alt: &quot;avatar&quot;
      },
      album: [
        {
          dataType: &quot;image&quot;,
          src: &quot;https://firebasestorage.googleapis.com/album_image1.png&quot;,
          alt: &quot;album_image1&quot;
        },
        {
          dataType: &quot;image&quot;,
          src: &quot;https://firebasestorage.googleapis.com/album_image2.png&quot;,
          alt: &quot;album_image2&quot;
        }
      ],
      cards: [
        {
          icon: {
            dataType: &quot;image&quot;,
            src: &quot;data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEBXgF&quot;,
            alt: &quot;card_image1&quot;
          },
          title: &quot;新規事業企画担当&quot;,
          description: [
            &quot;企画書だけでは、「新しいビジネスの良さを理解してもらう事」が難しい！&quot;,
            &quot;アイディアを実際に使ってもらって実感してもらいたい！&quot;
          ]
        }
      ]
    }
  };
  </code></pre>
  <p>I want to extract all the base64 urls (none https) and upload to cloud storage, and after uploaded the storage I want to update the uploaded urls to the data object above before saving the data object to the database. But the problem is the data structure is complicated and can be 2 or 3 or more in nested level. I am scratching my head to find a solution. Please help me!</p>