function update(d){ d.features.forEach(function(d) { var code = d.properties.iso_a2.toLowerCase() var traslate; var url = "https://www.googleapis.com/language/translate/v2?key=AIzaSyAADudga5Cdk2QlHDWF8UAHQEy-Z_ikHw8&target=" + code + "&q=Hello"
$.ajax({ url: url, type: 'GET', success: function(data){ //console.log(data) d.properties.hello = data.data.translations[0].translatedText }, error: function(data) { } })
}); return d}
d3.json(url, update, function(err, world) { } )
d3.request("https://www.googleapis.com/language/translate/v2?key=AIzaSyAADudga5Cdk2QlHDWF8UAHQEy-Z_ikHw8&target=es&q=Hello", function(blah) { console.log(blah); })
--
You received this message because you are subscribed to the Google Groups "d3-js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to d3-js+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "d3-js" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/d3-js/B_fcuZpxQfA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to d3-js+unsubscribe@googlegroups.com.