Click here to Skip to main content
15,791,963 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi there - I am using Javascripts on Highmaps and am getting the error: Uncaught SyntaxError: Unexpected token va on the following code. Can someone please point out where I am going wrong?

$(function () {

  $.getJSON('', function (geojson)
  // Prepare random data
    var data = [geojson.features.'2011 Population'] {

        // Initiate the chart
        Highcharts.mapChart('container', {
            title: {
                text: 'GeoJSON in Highmaps'

            mapNavigation: {
                enabled: true,
                buttonOptions: {
                    verticalAlign: 'bottom'

            colorAxis: {
            series: [{
                data: data,
                mapData: geojson,
                name: 'Random data',
                states: {
                    hover: {
                        color: '#BADA55'
                dataLabels: {
                    enabled: true,
                    format: '{}'

What I have tried:

debugging, counting the number of brackets - I cannot see what is wrong
Updated 13-Nov-16 8:00am

1 solution

var data = [geojson.features.'2011 Population'] {

Next time you copy a sample do it properly, and use a decent JavaScript editor...
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900