How do I extract data from this api ? -Wikipedia viewer

How do I extract data from this api ? -Wikipedia viewer
0.0 0

#1

here’s the sample code

Example JSON

How do i extract value from it

like this?

  $.getJSON("www.someurl.com/" + searchString + "w/", function (obj) {
            var arr1 = [];
            arr1 = obj[1];  // or obj.["1"] or any other methods?
            console.log(arr1[0]);
        });

#2

If you have not already done so, I strongly suggest looking at the various challenge which deal with accessing data from arrays and objects available in the Basic JavaScript section of the Free Code Camp curriculum (https://www.freecodecamp.org) . That JSON format is nothing more than an array with the first element being a string and the remaining 3 elements being arrays themselves. The curriculum will teach you how to answer your own question.