You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a use case where I need to parse and stringify an object containing arrays of strings. These arrays may include strings that contain commas (",") as part of their value. For example:
I have a use case where I need to parse and stringify an object containing arrays of strings. These arrays may include strings that contain commas (
","
) as part of their value. For example:Example 1:
Example 2:
Code Example:
The output of the above code varies depending on the version of
query-string
used.Version 6.12.1:
For Example 1, the output does not split
"val1,val2"
:For Example 2, the output also does not split
"val1,val2"
:Version 6.14.1:
For Example 1, the output does not split
"val1,val2"
:For Example 2, the output splits
"val1,val2"
:Version 9.1.1:
For Example 1, the output does not split
"val1,val2"
:For Example 2, the output splits
"val1,val2"
:Question:
Version
6.12.1
works best for my use case. However, I want to understand:arrayFormat: "comma"
and cannot switch to another format, how should I handle this issue?codesandbox: https://codesandbox.io/p/sandbox/query-string-forked-rwvl3y?file=%2Fsrc%2Findex.js
The text was updated successfully, but these errors were encountered: