title: Add the image path in script to get the image from json file
body: <p><strong>Background</strong> : </p>
  
  <p>I need to get the image from path from below json file :</p>
  
  <pre><code>{
    "path" : " shape\/",
    "info" : {
      "author" : ""   
    },
    "name" : "shape",
    "layers" : [
      {     
        "height" : 612,
        "layers" : [
          {         
            "name" : "bg_rectangle_1"
          },
          {         
            "height" : 475,
            "layers" : [
              {
  
                "src" : "http://sitename.com/images/oneheart.png",             
                "name" : "mask_image_1"
              },
              {              
                "name" : "useradd_ellipse1"
              }
            ],          
            "name" : "user_image_1"
          }
        ],      
        "name" : "loveshape_17"
      }
    ]
  }
  </code></pre>
  
  <p>I successfully did it with below code :</p>
  
  <pre><code>var maskedImageUrla = "";
  
      $.getJSON('test.json', function(json) {
          for (let layer of json.layers) {
              if (layer.layers &amp;&amp; layer.layers.length &gt; 0) {
                  for (let temp of layer.layers) {
                      if (temp.src) maskedImageUrla = temp.src;
                      else if (temp.layers) {
                          for (let tl of temp.layers)
                              if (tl.src) maskedImageUrla = tl.src;
                      }
                  }
              }
          }
  </code></pre>
  
  <p><strong>Requirement</strong> :</p>
  
  <p>In above json file if src is like this : <code>"src" : "oneheart.png"</code> [instead of full path] , than how to get the image ? becasue image exist in this path : <code>http://sitename.com/images/oneheart.png</code></p>
  
  <p>Here is <a href="https://pastebin.com/DrmuzEA3" rel="nofollow noreferrer">Full script</a> &amp; <a href="https://pastebin.com/pChkBaHV" rel="nofollow noreferrer">json file</a></p>