my world map

hightchart demo

by Bhabani Raju

HTML

<script src="https://code.highcharts.com/maps/highmaps.js"></script>
<script src="https://code.highcharts.com/maps/modules/data.js"></script>
<script src="https://code.highcharts.com/mapdata/custom/world.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>

<div id="container"></div>

JavaScript

$(document).ready(function() {

 $.ajax({
 			dataType: "json",
        url: 'https://newapi.brandwatch.com/projects/1998196209/data/volume/queries/countries?endDate=2016-11-15T00:00:00.000Z&queryId=1998657357&startDate=2016-11-01T00:00:00.000Z&access_token=c59b4f94-5a05-4251-a1ea-b29725802b6f',
        success: function(response) {
        var jsontext = response.results;
		
		
     //alert(jsontext.length);
	 
	 
var jsonName;var jsonValue;
        $(jQuery.parseJSON(JSON.stringify(jsontext))).each(function() {  
            var data =this.values;
         // alert(data.length);
          var jname = []; var jvalue = [];
		
            $(data).each(function(index, element) {
            //  console.log('Name: ' + element.id + ', Value: ' + element.value);
              //var splitname = element.name.split("");
            
		
				
				jname.push('code:"' +element.id +' " ,z:'+ element.value);
			
				
                
				/*?([{
    code: "AF",
    z: 30552
},, {
   code: "ZW",
    z: 14150
}]);*/
				
				
              //  jvalue.push(element.value);
                    //Math.floor((Math.random() * 100) + 1)
                
                
            });
			
			
	
	
             jsonName = jname;
           ///  jsonValue = jvalue;



//jsonstring = JSON.stringify(jsonName);
//alert(jsonstring);

//$.extend({}, jsonstring);

alert(jsonName);
  Highcharts.mapChart('container', {
	chart: {
		borderWidth: 1,
		map: 'custom/world'
	},

	title: {
		text: 'World population 2013 by country'
	},

	subtitle: {
		text: 'Demo of Highcharts map with bubbles'
	},

	legend: {
		enabled: true
	},

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

		series: [
	{
		name: 'Countries',
		color: '#E0E0E0',
		enableMouseTracking: false
	}, {
		type: 'mapbubble',
		name: 'Population 2013',
	joinBy: ['iso-a2', name],
		data: jsonName,
		minSize: 4,
		maxSize: '12%',
		  /* tooltip: {
                    pointFormat: '{point.jsonName}:...