I used Yahoo to get a Json result back.
My query
jQuery.get(
'/Ethnic/JsonData', function (result)
{
$('#JsonList').empty();
$('#JsonList').append('<li>' + result + '</li>');
$.each(result, function (index, value) {
$('#JsonList').append('<li>' + value + '</li>');
});
}
); produces each character in the result list instead of getting me the data.
Can some one help?
I have given below the Yahoo result.
Thanks.
Vijay
{
"ResultSet": {
"totalResultsAvailable": "690",
"totalResultsReturned": "2",
"firstResultPosition": "1",
"ResultSetMapUrl": "http://maps.yahoo.com/broadband/?q1=Fremont,+CA+94539&tt=pizza&tp=1",
"Result": [
{
"id": "21433124",
"Title": "New York Pizza",
"Address": "41300 Fremont Blvd",
"City": "Fremont",
"State": "CA",
"Phone": "(510) 770-0123",
"Latitude": "37.529462",
"Longitude": "-121.958455",
"Rating": {
"AverageRating": "5",
"TotalRatings": "8",
"TotalReviews": "7",
"LastReviewDate": "1263606235",
"LastReviewIntro": "A friend of mine had tasted a piece of the sausage pizza that was served at a local drinking establishment during happy hour and then commented to me days later of how good it was so I had to try it. The sausage with pesto sauce is the best damn pizza I've had in years. And while we're on the subject of New York Style pizza I had a piece in Time Square about three years ago and they have a New York Style pizza here in Fremont that tastes just as good. If you're tired of the same ole pizzas then GO GET A PIZZA FROM HERE, ITS REALLY DELICIOUS!"
},
"Distance": "1.97",
"Url": "http://local.yahoo.com/info-21433124-new-york-pizza-fremont",
"ClickUrl": "http://local.yahoo.com/info-21433124-new-york-pizza-fremont",
"MapUrl": "http://maps.yahoo.com/maps_result?q1=41300+Fremont+Blvd+Fremont+CA&gid1=21433124",
"Categories": {
"Category": [
{
"id": "96926234",
"content": "Carry Out & Take Out"
},
{
"id": "96926236",
"content": "Restaurants"
},
{
"id": "96926243",
"content": "Pizza"
}
]
}
},
{
"id": "21437400",
"Title": "Mission Pizza & Pub",
"Address": "1572 Washington Blvd",
"City": "Fremont",
"State": "CA",
"Phone": "(510) 651-6858",
"Latitude": "37.53118",
"Longitude": "-121.936675",
"Rating": {
"AverageRating": "4.5",
"TotalRatings": "10",
"TotalReviews": "10",
"LastReviewDate": "1264273290",
"LastReviewIntro": "I love it.. I also go ther for the Music on the weekends! Cowboy Bill is the best!"
},
"Distance": "1.26",
"Url": "http://local.yahoo.com/info-21437400-mission-pizza-pub-fremont",
"ClickUrl": "http://local.yahoo.com/info-21437400-mission-pizza-pub-fremont",
"MapUrl": "http://maps.yahoo.com/maps_result?q1=1572+Washington+Blvd+Fremont+CA&gid1=21437400",
"BusinessUrl": "http://missionpizza.com/",
"BusinessClickUrl": "http://missionpizza.com/",
"Categories": {
"Category": [
{
"id": "96926057",
"content": "All Bars, Pubs, & Clubs"
},
{
"id": "96926063",
"content": "Bars & Pubs"
},
{
"id": "96926190",
"content": "Italian Restaurants"
},
{
"id": "96926234",
"content": "Carry Out & Take Out"
},
{
"id": "96926236",
"content": "Restaurants"
},
{
"id": "96926242",
"content": "Fast Food"
},
{
"id": "96926243",
"content": "Pizza"
}
]
}
}
]
}
}