title: How to set selected value in dropdown through javascript
body: <p>I am using the following jquery code to get data from database-</p>
  
  <pre><code>$.get('loadTaskDetails' + $taskId, {taskId: $taskId}, function(data) {
                      $.each(data, function(i, data) {$('#ddl_Deliverables').find('option[value=data.tasks_deliverable_id]').attr('selected', true);    
                  });
                  }, 'json');
  </code></pre>
  
  <p>I have a a dropdown (ddl_Deliverables) which already contains many options. I want the option value to be set selected with the macthing value coming from database through $.get method.</p>