ljharb/qs

Array of objects not parsed correctly

Open

#252 opened on 2018年3月1日

GitHub で見る
 (14 comments) (3 reactions) (0 assignees)JavaScript (744 forks)batch import
help wantedparsequestionstringify

Repository metrics

Stars
 (8,015 stars)
PR merge metrics
 (平均マージ 6d 22h) (30d で 2 merged PRs)

説明

When parsing the URL ?param[][id]=5a53336d48ad1c6cba0e6ae8&param[][id]=5a53336d48ad1c6cba0e6ae7 I get

param: [{ id: ['5a53336d48ad1c6cba0e6ae8', '5a53336d48ad1c6cba0e6ae7'] }]

instead of

param: [ { id: '5a53336d48ad1c6cba0e6ae8' }, { id: '5a53336d48ad1c6cba0e6ae7' } ]

I am parsing as qs.parse(queryString, { arrayLimit: 50, ignoreQueryPrefix: true }).

Am I missing something?

コントリビューターガイド