How to parse (query) content from a Ajax request?

How to parse (query) content from a Ajax request?

Hi,

I want to do a Ajax GET request and then parse the resulting HTML to get a list of products from that page:

  1. $.get("http://www.americanas.com.br/busca/baskervilles?dep=256705", function(data) {
                  var domData = $(data);
                  alert($("div.hproduct", domData).length);
            });



This doesn't work. I get an error ("div is null") right on the first line of the function. The error is from jquery code.

Can anyone help? Thanks.