title: Cant get Data out of then() Scrapeit | NODE JS
body: <p>This is my simple App</p>
  
  <pre><code>for(var i = 0 ; i &lt; prod.length;i++ ){
  var urls = prod[i].URL
  urls = urls.split(" ")[0];
  scrapeIt(urls, {
  
     avatar: {
          selector: ".image img"
        , attr: "src"
      }
  }).then(async ({ data, response })  =&gt;  {
     // console.log(`Status Code: ${response.statusCode}`)
   urli = "https://www.choithrams.com"+data.avatar
  
   var name = prod[i].Name
   var price = prod[i].price
  
   console.log(name)
  })
  }
  </code></pre>
  
  <p>I want to get the result step by step but it is not iterating correctly. 
  Secondly I, for example, I have a global variable outside and I want to overwrite its value from the one I get, I cannot simply do it.</p>
  
  <p>the Result is  </p>
  
  <pre><code>Mara Chopped Tomatoes Easy Open 400 gms
  Mara Chopped Tomatoes Easy Open 400 gms
  Mara Chopped Tomatoes Easy Open 400 gms
  Mara Chopped Tomatoes Easy Open 400 gms
  Mara Chopped Tomatoes Easy Open 400 gms
  Mara Chopped Tomatoes Easy Open 400 gms
  </code></pre>
  
  <p>which is the last item in mineJSON. 
  I am a beginner in all this kindly do help. </p>