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.

Export stitching results

Some results need to be archived or sent to colleagues. Exporting them to a local TXT file is more trouble-free than copying them repeatedly.

📌 What file is exported?

It is a plain text TXT file (file name joined-text.txt), and the content is the spliced text in the result box; the file is generated on your computer and will not be uploaded.

📌 Splicing rules

The tool first uses JSON parsing to read the input into an array, and then uses the connector you fill in to connect the elements in sequence: leave the connector blank to connect directly, fill in ordinary symbols and insert them one by one. When a backslash plus n appears in the connector, it will be replaced with a real newline before participating in the connection. If the parsing fails, the result box will display a parsing error message, the status line will prompt a format problem, and the input content will remain unchanged; when the array is empty, the result will be an empty string, and the status line will still prompt that 0 elements have been spliced.

🧭 Common uses

It is very common to assemble the string array returned by the interface into display copy, the label array into a line of labels, the field name array into a SQL field list, and convert the array in the code into a string connected with commas or vertical bars; when multiple lines of text are required, use newline as the connector.

All keywords and tutorials 12

❓ FAQ

Can I export if there is no result?
No, you will be prompted to generate the result first.
Will the export lose line breaks?
No. Line breaks are written to the file as-is.
Suggestions for using exported
Before exporting, confirm that the splicing results are correct to avoid archiving incorrect content.