title: How can I query Neo4j by a user input value ? (Javascript)
body: <p>I am wondering why this code doesnt do what I want, and that is :</p>
  
  <p>I have a input tag with id = 'input1', and when the user presses the search button, I want to take that value to specify the name in the neo4j query. 
  But now I get empty brackets in my console ([]) instead of, for example, the node with name: Emil
  This is what I have so far:</p>
  
  <pre><code>&lt;input type="text" id="input1" /&gt;
  &lt;button onclick="myJsFunction()"&gt;Search&lt;/button&gt;
  </code></pre>
  
  <p>  </p>
  
  <pre><code>              function myJsFunction(){
  
  
   var body = JSON.stringify({
          statements: [{
              statement: " MATCH (n {name: '" +  document.getElementById('input1').value + "´}) RETURN n"
          }]
      });
  $.ajax({
  url: "http://localhost:7474/db/data/transaction/commit",
  type: "POST",
  data: body,
  dataType: "json",
  contentType: "application/json"
  
  })
  
        .done(function(result){
          console.log(result.results);
  
      })
      .fail(function(error){
          console.log(error.statusText);
      });
  </code></pre>
  
  <p>}</p>
  
  <p>Any help would be appreciated cuz I am stuck for now.</p>