Skip to content

Commit

Permalink
[Docs] update docs to add encodeDotInKeys behavior when encodeValuesO…
Browse files Browse the repository at this point in the history
…nly is present
  • Loading branch information
aks- committed Jan 28, 2024
1 parent 1c7e529 commit 14a0bcd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,9 @@ qs.stringify({ a: { b: { c: 'd', e: 'f' } } }, { allowDots: true });
```

You may encode the dot notation in the keys of object with option `encodeDotInKeys` by setting it to `true`
Note: it only works with `allowDots` being set to `true`:
Notes:
1. it only works with `allowDots` being set to `true`
2. when `encodeValuesOnly` is provided with `encodeDotInKeys`, it would only encode dots in keys and nothing else.
```javascript
qs.stringify({ "name.obj": { "first": "John", "last": "Doe" } }, { allowDots: true, encodeDotInKeys: true })
// 'name%252Eobj.first=John&name%252Eobj.last=Doe'
Expand Down

0 comments on commit 14a0bcd

Please sign in to comment.