title: Import JSON and convert to array
body: <p>I tried alot of things, but nothing worked. I'm using jQuery.</p>
  
  <p>So what I have to do is really to import <a href="http://jacce.dyndns.org/game/resources/game/map.php" rel="nofollow">http://jacce.dyndns.org/game/resources/game/map.php</a> (so far I succeeded with $.getJSON), convert it to an array and then place it in a global variable.</p>
  
  <p>I don't really know how to do any of the last two things (well, I know how to create global variables, but not inside jQuery functions). So, any help?</p>
  
  <p>EDIT: Here's the JSON:</p>
  
  <pre><code>{
      "-5": {
          "-5": {
              "id": "1",
              "colour": ""
          },
          "-4": {
              "id": "2",
              "colour": ""
          },
          "-3": {
              "id": "3",
              "colour": ""
          },
          "-2": {
              "id": "4",
              "colour": ""
          },
          "-1": {
              "id": "5",
              "colour": ""
          },
          "1": {
              "id": "6",
              "colour": ""
          },
          "2": {
              "id": "7",
              "colour": ""
          },
          "3": {
              "id": "8",
              "colour": ""
          },
          "4": {
              "id": "9",
              "colour": ""
          },
          "5": {
              "id": "10",
              "colour": ""
          }
      },
      "-4": {
          "-5": {
              "id": "11",
              "colour": " fill=\"#A90000\""
          },
          "-4": {
              "id": "12",
              "colour": ""
          },
          "-3": {
              "id": "13",
              "colour": ""
          },
          "-2": {
              "id": "14",
              "colour": ""
          },
          "-1": {
              "id": "15",
              "colour": ""
          },
          "1": {
              "id": "16",
              "colour": ""
          },
          "2": {
              "id": "17",
              "colour": ""
          },
          "3": {
              "id": "18",
              "colour": ""
          },
          "4": {
              "id": "19",
              "colour": " fill=\"#A90000\""
          },
          "5": {
              "id": "20",
              "colour": ""
          }
      },
      "-3": {
          "-5": {
              "id": "21",
              "colour": ""
          },
          "-4": {
              "id": "22",
              "colour": ""
          },
          "-3": {
              "id": "23",
              "colour": ""
          },
          "-2": {
              "id": "24",
              "colour": ""
          },
          "-1": {
              "id": "25",
              "colour": ""
          },
          "1": {
              "id": "26",
              "colour": ""
          },
          "2": {
              "id": "27",
              "colour": ""
          },
          "3": {
              "id": "28",
              "colour": ""
          },
          "4": {
              "id": "29",
              "colour": " fill=\"#A90000\""
          },
          "5": {
              "id": "30",
              "colour": ""
          }
      },
      "-2": {
          "-5": {
              "id": "31",
              "colour": ""
          },
          "-4": {
              "id": "32",
              "colour": ""
          },
          "-3": {
              "id": "33",
              "colour": ""
          },
          "-2": {
              "id": "34",
              "colour": ""
          },
          "-1": {
              "id": "35",
              "colour": ""
          },
          "1": {
              "id": "36",
              "colour": ""
          },
          "2": {
              "id": "37",
              "colour": ""
          },
          "3": {
              "id": "38",
              "colour": ""
          },
          "4": {
              "id": "39",
              "colour": ""
          },
          "5": {
              "id": "40",
              "colour": ""
          }
      },
      "-1": {
          "-5": {
              "id": "41",
              "colour": ""
          },
          "-4": {
              "id": "42",
              "colour": ""
          },
          "-3": {
              "id": "43",
              "colour": " fill=\"#A90000\""
          },
          "-2": {
              "id": "44",
              "colour": ""
          },
          "-1": {
              "id": "45",
              "colour": ""
          },
          "1": {
              "id": "46",
              "colour": ""
          },
          "2": {
              "id": "47",
              "colour": ""
          },
          "3": {
              "id": "48",
              "colour": ""
          },
          "4": {
              "id": "49",
              "colour": ""
          },
          "5": {
              "id": "50",
              "colour": ""
          }
      },
      "1": {
          "-5": {
              "id": "51",
              "colour": " fill=\"#A90000\""
          },
          "-4": {
              "id": "52",
              "colour": ""
          },
          "-3": {
              "id": "53",
              "colour": ""
          },
          "-2": {
              "id": "54",
              "colour": " fill=\"#A90000\""
          },
          "-1": {
              "id": "55",
              "colour": ""
          },
          "1": {
              "id": "56",
              "colour": ""
          },
          "2": {
              "id": "57",
              "colour": ""
          },
          "3": {
              "id": "58",
              "colour": ""
          },
          "4": {
              "id": "59",
              "colour": ""
          },
          "5": {
              "id": "60",
              "colour": ""
          }
      },
      "2": {
          "-5": {
              "id": "61",
              "colour": ""
          },
          "-4": {
              "id": "62",
              "colour": ""
          },
          "-3": {
              "id": "63",
              "colour": ""
          },
          "-2": {
              "id": "64",
              "colour": ""
          },
          "-1": {
              "id": "65",
              "colour": ""
          },
          "1": {
              "id": "66",
              "colour": ""
          },
          "2": {
              "id": "67",
              "colour": ""
          },
          "3": {
              "id": "68",
              "colour": ""
          },
          "4": {
              "id": "69",
              "colour": ""
          },
          "5": {
              "id": "70",
              "colour": ""
          }
      },
      "3": {
          "-5": {
              "id": "71",
              "colour": ""
          },
          "-4": {
              "id": "72",
              "colour": " fill=\"#000D81\""
          },
          "-3": {
              "id": "73",
              "colour": ""
          },
          "-2": {
              "id": "74",
              "colour": ""
          },
          "-1": {
              "id": "75",
              "colour": ""
          },
          "1": {
              "id": "76",
              "colour": ""
          },
          "2": {
              "id": "77",
              "colour": ""
          },
          "3": {
              "id": "78",
              "colour": ""
          },
          "4": {
              "id": "79",
              "colour": ""
          },
          "5": {
              "id": "80",
              "colour": " fill=\"#A90000\""
          }
      },
      "4": {
          "-5": {
              "id": "81",
              "colour": ""
          },
          "-4": {
              "id": "82",
              "colour": ""
          },
          "-3": {
              "id": "83",
              "colour": ""
          },
          "-2": {
              "id": "84",
              "colour": ""
          },
          "-1": {
              "id": "85",
              "colour": ""
          },
          "1": {
              "id": "86",
              "colour": " fill=\"#A90000\""
          },
          "2": {
              "id": "87",
              "colour": ""
          },
          "3": {
              "id": "88",
              "colour": ""
          },
          "4": {
              "id": "89",
              "colour": ""
          },
          "5": {
              "id": "90",
              "colour": ""
          }
      },
      "5": {
          "-5": {
              "id": "91",
              "colour": ""
          },
          "-4": {
              "id": "92",
              "colour": ""
          },
          "-3": {
              "id": "93",
              "colour": " fill=\"#A90000\""
          },
          "-2": {
              "id": "94",
              "colour": ""
          },
          "-1": {
              "id": "95",
              "colour": ""
          },
          "1": {
              "id": "96",
              "colour": ""
          },
          "2": {
              "id": "97",
              "colour": ""
          },
          "3": {
              "id": "98",
              "colour": ""
          },
          "4": {
              "id": "99",
              "colour": ""
          },
          "5": {
              "id": "100",
              "colour": ""
          }
      }
  }
  </code></pre>