I need to create an array in an HTML file of the form:
<script>
var markers = [
[1, 2],
[3, 4]
];
</script>
I can get this array from either one of two sources: python via pandas or sql. I know how to get the list into a flat file or json, but do not know how to get that list into the javascript array.
What's a good way to do this?
result = json.dumps(list)from python end andJSON.parse(result)from javascript end.{"a":{"0":-64.08,"1":-64.09},"b":{"0":42.13,"1":42.12}}