[jq] Split a string into an array

Created on November 30, 2026

Use split with the desired delimiter. The example splits a comma-separated string. -R reads the input as raw text.

echo 'apple,banana,orange' | jq -R 'split(",")'
[
  "apple",
  "banana",
  "orange"
]
jq