title: Send a List to JavaScript
body: <p><a href="https://i.stack.imgur.com/DdOaE.png" rel="nofollow noreferrer">This is my layout</a></p>
  
  <p>I want to update in relativaly "real-time" let's say every 10 seconds or so... the badge that says approved will say the getStatus()</p>
  
  <p>My problem is that i need to fetch data from a List and I have no idea how to send all this data to the JavaScript file.</p>
  
  <p><code>runningContainers</code> is a List and i need to get <code>runningContainers.getName()</code> and <code>runningContainer.getStatus()</code> for every one in the list and send it to the javascript.</p>
  
  <p><strong><em>I just need a way to pass all the data to the javascript so I can update the badges relativally to that name.</em></strong></p>
  
  <p>Java</p>
  
  <pre><code>  try {
  
              DockerClientConfig config = DefaultDockerClientConfig.createDefaultConfigBuilder()
                      .withDockerHost("tcp://localhost:2375")
                      .withDockerConfig("/")
                      //.withRegistryUsername("profile")
                      //.withRegistryPassword("profile")
                      .build();
  
              DockerClient dockerClient = DockerClientBuilder.getInstance(config).build();
  
              List&lt;Container&gt; runningContainers = dockerClient.listContainersCmd()
                      .exec();
  </code></pre>
  
  <p>JavaScript</p>
  
  <pre><code>    $.ajax({
          type: 'post',
          url: 'Containers',         
          success: function () {
  
          },
          error: function() {
  
          }
      });
  });
  </code></pre>