title: How do I display my result of a JavaScript function in HTML?
body: <p>first of all, yes I did search the community for any solutions, but I just dont understand them :(</p>
  
  <p>So I have a JavaScript Function which reads my .json file and shows the specific object I need in VisualCodee console. Now Im trying to display the Object into a HTML file.</p>
  
  <p>Basically: How do I display the client_ip in a HTML file?</p>
  
  <p>Down below you can see my JavaScript function which reads the client_ip in my .json file.</p>
  
  <pre><code>var obj = { 
       "source": "/var/log/apache2/git.1234.de-443-access.json",
       "data": {
          "http_code": 204,
          "pid": "-",
          "request_id": "-",
          "log_level": "-",
          "body_size": 0,
          "host": "git.1234.de",
          "peer_ip": "10.200.13.212",
          "duration": 1693,
          "source": "-",
          "client_port": "-",
          "error_message": "-",
          "client_ip": "10.200.13.333",
      }
     }
  
  //for client_ip ,
  var client_ip = obj.data.client_ip;
  console.log(obj.data.client_ip)
  </code></pre>
  
  <p>Here you can see my HTML, the name of my .json file which im reading from is "ws.json" and the name of my javascript file is "kommschon.js". </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      kommschon.js();
      function kommschon.js(){
          document.getElementById('clientIp).innerHTML ='clientIP';
  
      };
  
  
  
  &lt;/script&gt;
  
  &lt;body&gt;
  
          &lt;h1&gt;Java Loop&lt;/h1&gt;
  
          &lt;button type="button" class="button1" onclick="alert('Cleared!')"&gt;Clear!&lt;/button&gt;
  
          &lt;button class="button2" onclick="alert('Function running!')"&gt;Run!&lt;/button&gt;
  
  &lt;div id="clientIp"&gt;
  
  &lt;/div&gt;
  </code></pre>