How to parse and organize html ajax results with jQuery
I have an html page that uses jQuery to perform $.get calls to an asp.net page. The asp.net page looks up info from the database and returns a snippet of html code to the calling page, with no html tag, body tag....etc, just the specific snippet. I will use the html snippet that the page returns to parse info from it and plot points on a google map.
Here is what my page will currently return. Usually it will return this for more than one user. For every user the database finds, it will return the following html
<ul id="this is filled in with a different id value from database for each user it finds"> <li></li> <li></li> <li></li></ul>
There are three other values of each record returned from the database query besides the user id. These are represented in the list items. All 4 values are from the same record, but the ID value is the wrapper or ul part because that is the unique value of the record returned.
The three other values for the list items are Name, Lat, Lng.
I don't need to know the plotting part, just the best way to get these values into usable variables by parsing the very simple html snippet that will be returned.
I CAN count on the order in which these li values appear, so things like first-child could work. Or, I could use an id system and add that to the ouput html snippet. I don't know which is best. Looking for a good idea