looping through JSON array in a jQuery list

前端 未结 4 1377
长情又很酷
长情又很酷 2021-01-12 19:10

I have this JSON array

// Json array
var productList = {\"products\": [
    {\"description\": \"product 1\", \"price\": \"9.99\"},
    {\"description\": \"pr         


        
4条回答
  •  佛祖请我去吃肉
    2021-01-12 19:47

    I appears to me that what you really need is the .tmpl plugin to build your list from your json data:

    http://api.jquery.com/jquery.tmpl/

提交回复
热议问题