Im working on leaflet map, I need to place some points in the map. I made API in PHP that output data i want in json and i get it in javascript, but i need to make good format to work with leaflet..
async function get_data() {
let obj;
const res = await fetch('api.php')
obj = await res.json();
console.log(obj)
}
get_data();
I get this result in console:
but what I need is
let points = [
["43.6045", 1.444, "point 1"],
[43.60, 1.444, "point 2"],
];
should you be like that in console:
if someone have any idea how to do this it would really help me!
Thanks you, have a nice day.


"43.6045"a string and43.60a number? Also please share what you have already tried?latitudeto be a string, but the output has one number and one string. I assume this is a typo in the question?