title: How to retrieve data from server of a selected item in HTML
body: <p>I'm trying to create a website and i need to retrieve the full data of a selected item preview.</p>
  
  <p>For example: Amazon gives you all the products matching your search query, and then you can click on them to get to single product page.
  I would like to do the same thing.</p>
  
  <p>So far i have already written my search and dynamic load of items into my page:</p>
  
  <p>1) I have a node.js server which responds to a get request with a JSON file containing a list of elements (in my case, doctors)</p>
  
  <pre><code>app.get('/doctors', function(req,res){
    var config = require('./doctor.json');
    config.forEach(function(dottore) {
      var tableName = dottore.name;
      console.log(tableName);
      });
    res.send(JSON.stringify(config));
  })
  </code></pre>
  
  <p>2) I make the request from my client side javascript like this:</p>
  
  <pre><code>$.get( '/doctors', function(data) {
  $("&lt;div class='row' id='dottori' &gt;&lt;/div&gt;").appendTo(".team");    
  console.log(typeof data)
  
  JSON.parse(data).map(addElement);    
   });
  
  function addElement(doctor){
    console.log("Adding doctor");
    id=doctor.id;
    console.log(id);
    $("#dottori").append('&lt;div class="col-md-4 ml-auto mr- 
                auto"&gt;&lt;a href="./personaleGenerico.html" class="card card- 
          profile card-plain"&gt;&lt;div class="btn btn-primary card-header card-header-image image-camminiamo"&gt;&lt;img class="img" src="../assets/img/faces/4.jpg"&gt;&lt;/div&gt;&lt;div class="card-body "&gt;&lt;h3 class="card-title"&gt;'+doctor.name+'&lt;/h3&gt;&lt;h4&gt;Dott. in '+doctor.job+'&lt;/h4&gt;&lt;/div&gt;&lt;/a&gt;&lt;/div&gt;');
  
  }
  </code></pre>
  
  <p>And it works fine. </p>
  
  <p>What i need to do now is to click on the preview of my doctor and load the page <code>personaleGenerico.html</code>, which should contain the full informations about that doctor.</p>
  
  <p>I don't know how to associate the data on my server (which is a JSON containing all the informations of all doctors) to the element i've clicked.</p>
  
  <p>For example: if i click the first doctor called "John", i will move to the page <code>personaleGenerico.html</code> filled with the information of that specific doctor (that are all avaiable in my JSON file) </p>