JSFiddle - React, Tailwind, and code Playground
HTML
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js"></script>
JavaScript
$.ajax({
url: 'https://reverse.geocoder.ls.hereapi.com/6.2/reversegeocode.json',
type: 'GET',
dataType: 'jsonp',
jsonp: 'jsoncallback',
data: {
prox: '43.564624, 3.847154,250',
mode: 'retrieveAddresses',
maxresults: '1',
gen: '9',
apiKey: 'H6XyiCT0w1t9GgTjqhRXxDMrVj9h78ya3NuxlwM7XUs'
},
success: function (data) {
var re = JSON.stringify(data);
console.log(data);
var num = (data.Response.View[0].Result[0].Location.Address.HouseNumber);
var rue = (data.Response.View[0].Result[0].Location.Address.Street);
var ville = (data.Response.View[0].Result[0].Location.Address.City);
var CP = (data.Response.View[0].Result[0].Location.Address.PostalCode);
console.log(num, rue, CP, ville)
}
});