Hongmu Notes

🔗 Concatenate arrays into strings

Concatenate the JSON array into a line of text using custom connectors.

Concatenate arrays into strings

Instructions for use

  • Paste the JSON array, fill in the connectors and click "Splice"
  • If you add a backslash and n in the connector, it will become a real line break.
  • Array elements must be wrapped in double quotes. Single quotes will fail to parse.

What can this tool do?

  • Splice the JSON array into a line of text using custom connectors
  • If you add a backslash and n in the connector, it will become a real line break.
  • Display error message when parsing fails to facilitate locating writing problems
  • Results can be copied or exported to a TXT file

Actual measurement effect

arrayconnectorresult
["b","u","g"]Leave blankbug
["b","u","g"]-b-u-g
["b","u","g"]backslash plus nThree lines: b/u/g

The backslash plus n in the joiner will be interpreted as a newline, so the spliced result can become multi-line text.

Usage tips

  • Elements must be enclosed in double quotes. Single quotes will cause parsing to fail.
  • Arrays can only contain strings or numbers, and nested arrays will be spelled into comma strings.
  • If you need to reverse the operation (convert one line to an array), please use the string to array tool on the site.

All keywords and tutorials 12

❓ FAQ

What format should the input be written in?
JSON array: The elements are enclosed in double quotes and separated by English commas, such as an array composed of double quotes b, u, and g; single quotes will fail to parse.
How to write connector
Fill in whatever you want, leave it blank to connect directly without separators; when written as a backslash plus n, it will become a real line break (this is the behavior of the original tool).
What happens if parsing fails?
The result box will display the error information returned by the parsing, making it easy to locate whether there are missing quotes or unpaired brackets, and the status line will also give an error message.
Will the array be uploaded?
No. Parsing and splicing are completed locally in the browser, and the content does not go through the server.