1
0
mirror of https://github.com/stedolan/jq.git synced 2024-05-11 05:55:39 +00:00

Support numbers and boolean in join (fix #930)

This commit is contained in:
David Tolnay
2015-10-17 22:44:40 -07:00
parent 8eb1367ca4
commit e17ccf2297
3 changed files with 31 additions and 6 deletions

View File

@@ -1446,11 +1446,17 @@ sections:
running `split("foo") | join("foo")` over any input string
returns said input string.
Numbers and booleans in the input are converted to strings.
Null values are treated as empty strings. Arrays and objects
in the input are not supported.
examples:
- program: 'join(", ")'
input: '["a","b,c,d","e"]'
output: ['"a, b,c,d, e"']
- program: 'join(" ")'
input: '["a",1,2.3,true,null,false]'
output: ['"a 1 2.3 true false"']
- title: "`ascii_downcase`, `ascii_upcase`"
body: |