Wikipedia viewer - problem parsing json data

Wikipedia viewer - problem parsing json data
0.0 0


I am having a problem parsing the json data. I am able to form the search url okay to search wikipedia api. I also can successfully open the url in a new window to view the json data. However the search result never appears on my wikipedia viewer app. How can I fix this?

My codepen link is here for my wikipedia viewer

Thank you,


Hey. Check the output of the request more carefully. It should be and not Also, you don’t need the cors website; you can just pass the origin=* parameter in the wikipedia URL like:

var url = '*&action=query&utf8&list=search&format=json&srsearch='

See the post below for more info about it:


That solved my problem. I appreciate your help. Thank you also for the information about cors.