Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html ng-app='app'>
<head>
<script src="https://code.jquery.com/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body  ng-controller="MyCtrl">
</body>
</html>
 
var app = angular.module('app', []);
app.controller('MyCtrl', function($scope) {
 
  
});
    var data = {
      "ES": {
        "130": {
          "code": "A Coruсa",
          "name": "A Coruña"
        },
        "131": {
          "code": "Alava",
          "name": "Alava"
        },
        "...": {
          "code": "...",
          "name": "..."
        }
      },
      "CH": {
        "104": {
          "code": "AG",
          "name": "Aargau"
        },
        "...": {
          "code": "...",
          "name": "..."
        }
      }
    };
    var list = [];
    Object.keys(data).forEach(function(key){
      Object.keys(data[key]).forEach(function(sub_key){
         list.push(data[key][sub_key]);
      });
      console.log(list);
    });
Output

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

Dismiss x
public
Bin info
mzohaibqcpro
0viewers