mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-12-25 13:53:48 +01:00
Transform to one line with jsonify and JSON parse
This commit is contained in:
parent
d566394650
commit
f690de40d3
@ -1,10 +1,11 @@
|
||||
<script>
|
||||
{{- $files := readDir "/static/data" -}}
|
||||
{{- $files := readDir "/static/data" }}
|
||||
{{- $list := slice }}
|
||||
function getDataFilesName(){
|
||||
var files=[]
|
||||
{{- range $files }}
|
||||
files.push({{ .Name }})
|
||||
{{- $list = $list | append .Name }}
|
||||
{{- end }}
|
||||
var files=JSON.parse({{ jsonify $list }})
|
||||
return files
|
||||
}
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user