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.

Batch array splicing

When several groups of arrays need to be processed at one time, pasting them one by one is too slow; it is recommended to process them one by one and save them separately to avoid mixing the results.

📌 Can I spell multiple arrays at once?

This page parses one array at a time, so please process multiple groups separately; the result box only retains the latest result. After processing, please copy or export it before doing the next group.

📌 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 it be spliced in batches by row?
No. The one array per line suggestion is processed line by line.
Will the results overwrite each other?
Yes. The result box only displays the most recent stitching.
Organizing suggestions for batch processing
Export or copy each group after processing, and mark the source in the file name or notes if necessary.