title: How to check if ajax response contains specific value
body: <p>How can you check to see whether the returned results contain a specific value?</p>
  
  <pre><code>$(function () {
      $('form').submit(function (e) {
          e.preventDefault();
          $.ajax({
              url: this.action,
              type: this.method,
              data: $(this).serialize(),
              success: function (result) {
  
                 //here i wanna check if the result return contains value "test"
                 //i tried the following..
                   if($(result).contains("test")){
                   //do something but this doesn't seem to work ...
                   }
  
                  }
              },
          });
      });
  });
  </code></pre>