the data is fetching in the console but I need it to be in the response please help me with that
const getLoc = async () => {
if (latitude !== "" && longitude !== "") {
console.log("call google api");
let url = `https://maps.googleapis.com/maps/api/geocode/json?latlng=${latitude},${longitude}&key={key}`;
await axios(url, {
method: "get",
})
.then((res) => {
console.log("res", res);
})
.catch((error) => {
console.log(error);
});