Access and return data from restful webservice to jquery
<p>i have this restful web service where i actually return a list&lt;> in c#. Now i need to access it with jquery and ajax(this part done) what i haven't and i couldn't do is how to traverse the data and print it one by one on the jquery side. Any help will be much appreciated. UPDATE: having this code on my rest web service. Can you give me a sample code for the $.each function? because i can't seem to make it work. THANK YOU.</p>

<pre><code>       List&lt;Inventory&gt; IService1.GetInventory()
    {
        List&lt;Inventory&gt; list = new List&lt;Inventory&gt;(); using (SqlConnection testconn = new SqlConnection(connection))
        {
            if(testconn.State == ConnectionState.Closed)
            {
                testconn.Open();
            }

            using(SqlCommand testcmd = new SqlCommand("select * from inventoryitem",testconn))
            {
                SqlDataReader reader = testcmd.ExecuteReader();
                while( reader.Read())
                {
                    Inventory testObj = new Inventory();
                    testObj.InventoryName = reader["StandardCost"].ToString();
                    list.Add(testObj);
                }
            }
        }
        return list;
    }
</code></pre>
