Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var a = [];
- $('.wikitable tr td:nth-child(2)').each(function() {
- var b = $(this).text();
- if ($.inArray(b, a) === -1) {
- if (b.indexOf(' & ') > -1) {
- for (var i in b.split(' & ')) {
- a.push(b.split(' & ')[i]);
- }
- } else {
- a.push(b);
- }
- }
- });
- console.log(
- a.reduce(function(a, b) {
- if (a.indexOf(b) < 0) a.push(b);
- return a;
- },[])
- .sort()
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement