title: Get JSON and save as Variabel depending on ID
body: <p>I got the following JSON Example. 
  Now I would like that if i enter the url: <a href="http://url.de#1234" rel="nofollow">http://url.de#1234</a>, that all content of kunde -> 1234 is written to variables. How can this be done?</p>
  
  <p>JSON: </p>
  
  <pre><code>{
  "kunde": {
      "1234": [{
          "gender": "male",
          "firstname": "Karl-Heinz",
  
      }],
  
      "3214": [{
          "gender": "female",
          "firstname": "Annette-Heinz",
  
      }],
  
      "5845": [{
          "gender": "male",
          "firstname": "Anton-Heinz",
  
      }]
    }
  }    
  </code></pre>
  
  <p>JSFIDDLE to JS and HTML: <a href="http://jsfiddle.net/7atLe66g/" rel="nofollow">http://jsfiddle.net/7atLe66g/</a></p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>This does work, BUT not the HASH Grabber and inserting into the JSON Function. 
  why not??</p>
  
  <pre><code>var url = window.location.href, idx = url.indexOf("#");
  var hash = idx != -1 ? url.substring(idx+1) : "";
  
  var json_url = "http://localhost/test/beispiel.json";
  $.getJSON(json_url, function (data) {
  
      var t = data.kunde[hash][0];
      alert(t.gender + "  " + t.firstname);
  
  });
  </code></pre>