Json encode data map marker

This is my answer from sep 2020:

Your pairs should be like this :
[
{ lat: 37.772, lng: -122.214 },
{ lat: 21.291, lng: -157.821 },
{ lat: -18.142, lng: 178.431 },
{ lat: -27.467, lng: 153.027 },
]
In my case I returned a Json where the lat and long pairs existed and I assembled a string as shown above.
Because the longitudes and latitudes are in a table in my database. In this table I have this latitude and longitude information for each person registered. So on the return Json, I took these pairs and assembled the pairs to show the markers.

This json I mount after searching mysql and put it in the block:

json2
In this block it can receive 1 or N coordinates.