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.

Splice by row

When you need to convert the array elements into multi-line text, just fill in the connector with a newline, one element per line, to facilitate line-by-line checking.

📌 How to enter newline connector

Enter a backslash plus n (two characters) in the connector input box, and the tool will interpret it as a real line break; this is the behavior of the original tool, and it is also convenient for expressing line breaks in the single-line input box.

🧭 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.

🔒 Dealing with location and privacy

The parsing and splicing are all done locally in the browser. There is no Internet access, no uploading, and no writing to local storage. It will be cleared after refreshing. When the results are exported to local files, they are only generated on your own computer, and the files only contain the result text.

All keywords and tutorials 12

❓ FAQ

Can you omit the backslash?
No. The connector input box is a single-line input. If you need to break the line, please use a backslash plus n.
Will the result be one more blank line?
No. Insert a newline between elements and no additional line breaks at the end.
The purpose of splicing by rows
Turn the array into a line-by-line list to facilitate line-by-line checking and table import.