Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
 
var url_list = [
  "https://www.facebook.com/impression.php/f2e61d9df/?lid=115",
  "https://www.facebook.com/plugins/like.php?app_id=5",
  "https://www.facebook.com/tr/?id=228037074239568",
  "https://www.facebook.com/tr/?ev=ViewContent",
  "http://www.marvel.com/abc?f=33",
  "http://www.marvel.com/games?a=11",
  "http://www.marvel.com/games?z=22",
  "http://www.marvel.com/videos"
];
var urlListextended=url_list.map(el=>el.split("://")[1].split("/"));
var result={};
for(var index in urlListextended){
    var el=urlListextended[index];
   result[el[0]]=result[el[0]]||{};
    result[el[0]][el[1]]=result[el[0]][el[1]]||[];
    result[el[0]][el[1]].push(url_list[index]);
 }
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers