我想从这个json字符串中从我的php api返回DishName。钛手机解析json响应
JSON字符串是
["Spicy.com Specials",{"CatID":31,"CatName":"Spicy.com Specials","DishName":"Kashmiri Chicken","DishID":52,"DishDesc":"Cooked with lychees and banana in a lovely sweet and creamy sauce","DishPrice":6.99,"CatDescription":" "},{"CatID":31,"CatName":"Spicy.com Specials","DishName":"Telapia Fish","DishID":51,"DishDesc":"Lightly spiced fillet, a very popular white fish made with peppers, onions and spices in medium sauce","DishPrice":6.99,"CatDescription":" "},
我的二码为
var cats = eval('('+this.responseText+')');
alert(cats[0]);
这让是我 'Foo.com特价' 不过,我需要的DishName,任何帮助将不胜感激 感谢
请务必将其标记为正确的答复之一。 – flumpb 2012-04-05 19:36:50