wikimedia

parse json string from wikimedia using jquery

社会主义新天地 提交于 2019-11-29 12:13:02
Im tring to get the infobox from wiki pages. For this I'm using wiki api. The following is the url from which I'm getting json data. http://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvprop=content&format=json&titles= "+first+"&rvsection=0 Where first is a variable containing the article title for Wikipedia. I'm finding it extremely complex to parse this data to make a meaningful html out of it. I was usuing $.each function initially. But the loop is very deep that I had to use 6-7 times to get to the actual data that I want. I think there would be better alternative than this.

parse json string from wikimedia using jquery

为君一笑 提交于 2019-11-28 05:42:54
问题 Im tring to get the infobox from wiki pages. For this I'm using wiki api. The following is the url from which I'm getting json data. http://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvprop=content&format=json&titles="+first+"&rvsection=0 Where first is a variable containing the article title for Wikipedia. I'm finding it extremely complex to parse this data to make a meaningful html out of it. I was usuing $.each function initially. But the loop is very deep that I had to use 6-7