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
Since qs.stringify({params: {"2": 1}}, { encodeValuesOnly: true }) produces 'params[2]=1', this seems like an issue with parse.
However, while qs.parse('params[2]=1') produces { params: [ '1' ] }, qs.parse('params[2]=1', { allowSparse: true }) produces { params: [ <2 empty items>, '1' ] }, so i think the thing you're looking for is the allowSparse option?
If i run this code i would expect the resulting object to be
{params: {"2": "1"}}
qs.parse(qs.stringify({params: {"2": 1}}))
Qs parses it as:
{params: ["1"]}
The text was updated successfully, but these errors were encountered: