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.

Verification of splicing results

The most important thing to confirm after splicing is "whether there are missing elements": count the number of separators and you can roughly judge.

📌 How to count the number of elements

If the connector is fixed and the element does not contain the symbol, the number of elements is equal to the number of occurrences of the connector plus one; the result can also be split according to the connector and compared with the original array one by one.

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

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

All keywords and tutorials 12

❓ FAQ

Can it be checked automatically?
No. This page is only responsible for splicing. Please check manually or use the form for verification.
What to do if elements contain connectors
It will interfere with the counting. It is recommended to use a connector that does not appear in the element.
Check priority
First check the number of elements → then randomly check the first and last elements → finally confirm that the special characters have not been eaten.