Got a static var which is working, now need to get dynamic var which isnt working
<p>got this variable:</p>

<pre><code> var zvmlist = { 
   'Huishoudelijke hulp': 'Huishoudelijke hulp', 
   'Verpleging thuis': 'Verpleging thuis',
   'Verzorging thuis': 'Verzorging thuis',
   '24 uurs zorg': '24 uurs zorg',
   'Ondersteunende begeleiding': 'Ondersteunende begeleiding',
 }; 
</code></pre>

<p>this var is used in a function to create a dropdownlist:</p>

<pre><code>    $.each(zvmlist, function(key, value) { 
  var selected='';
  if(key==eventdata.title){var selected='selected' }
  $('&lt;option value="'+key+'" '+selected+'&gt;'+value+'&lt;/option&gt;').appendTo($('#calendar_edit_entry_form_title')); 
  });
</code></pre>

<p>which works lika a charm.
Now I created a function to fetch the list from a mysql table:</p>

<pre><code> $.get('get_zorgvormen.php', function(data) {

    var zvmlist = '{'+data+'}';
    //alert(zvmlist);

  });
</code></pre>

<p>when I enable the alert function it shows me the var(array).
But I it wont act as a variable.
How can I pass this data to my .each function?</p>

<p>see it in action here: <a href="http://www.zorgzuster-zeeland.nl/site/static/calendar_test.php" rel="nofollow">http://www.zorgzuster-zeeland.nl/site/static/calendar_test.php</a></p>
