title: Data didnt coming from api.Javascript doesnt work on html file
body: <p>I have some problems. i should present on html file data. Data coming from api.And i append to data to array.On blogs i should show article image and title.But didnt add. Where is my mistake. Please help me</p>
  <pre><code>const blogs = {
    baseURL: &quot;http://127.0.0.1:8000/&quot;,
    blogs: () =&gt; {
      let blogData = $(&quot;.blog_area&quot;).serializeArray();
      let blogArray = {};
      if (blogData) {
        blogArray.id = blogData[0].value;
        blogArray.image = blogData[1].value;
        blogArray.title = blogData[2].value;
        blogArray.article=blogData[3].value;
        console.log(blogArray)
        const request = new XMLHttpRequest();
        request.open(&quot;GET&quot;, blog.baseURL + &quot;blog/allblog&quot;, true);
        request.setRequestHeader(&quot;content-type&quot;, &quot;application/json&quot;);
        request.send(JSON.stringify(blogArray));
        
        request.onload = () =&gt; {
          if (request.status != 400 &amp;&amp; request.status != 500) {
      console.log(blogArray);
             col = $(&quot;&lt;div&gt;&quot;);
             col.addClass(&quot;blog-content col-md-9&quot;);
             $(&quot;.blog-content&quot;).attr(&quot;id&quot;);
             $(&quot;.blog-content&quot;).attr(&quot;image&quot;);
             $(&quot;.blog-content&quot;).attr(&quot;title&quot;);
             $(&quot;.blog-content&quot;).attr(&quot;article&quot;);
             col.append(image);
             col.append(article);
             col.append(id);
             console.log(&quot;salam&quot;);
             col.append(title);
  console.log(blogArray);
          
  
          } else {
            console.log(&quot;You didnt get &quot;);
          }
        };
      }
    },
  };
  </code></pre>