NOTE: This site use JavaScript which appears to be turned off. Most content will be fine, but some things won't work.
#!/bin/bash find ./samples -type f -maxdepth 1 -exec basename {} \; \ | sort \ | jq -Rs \ 'split("\n") | map(select(length > 0)) | {files: .}' \ > output.json
{ "files": [ "alfa.txt", "bravo.txt", "charlie.txt", "delta.txt", "echo.txt" ] }