ljharb/qs

Array of objects not parsed correctly

Open

#252 创建于 2018年3月1日

在 GitHub 查看
 (14 评论) (3 反应) (0 负责人)JavaScript (744 fork)batch import
help wantedparsequestionstringify

仓库指标

Star
 (8,015 star)
PR 合并指标
 (平均合并 6天 22小时) (30 天内合并 2 个 PR)

描述

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?

贡献者指南