Closed baaraak closed 2 years ago
Did you figure it out?
nope... not relevant for me anymore
@baaraak ok - that's confusing. Why is it no longer relevant?
fwiw this is because there isn't currently any sensible way to omit indices, AND have an array of objects. If you stringify with arrayFormat: indices
then it should round-trip just fine.
not relevant because I'm saving the data in a different structure now, so the new structure works fine.
I assumed that probably I have a typo somewhere and it's not a bug in qs
.
BTW, I'm trying to add the arrayFormat: indices
, but it's still not working...
const sting = stringify(filters, {arrayFormat: 'indices'});
const parsed = parse(sting, {arrayLimit: 100});
console.log(parsed);
still going to transform the value.value
arrays into objects
https://codesandbox.io/s/restless-meadow-3zbxi8?file=/src/App.js
I see what you mean: https://codesandbox.io/s/bitter-cloud-1jc73n?file=/src/App.js it round trips to a string correctly, but not to the initial nested array. This is definitely worth fixing.
Hi, i'm trying to
stringify
andparse
this object but i'm keep getting the wrong result... every thisnewFiltes[0].filters[0/1].value.value
should be array of strings, it's always transforming this array to{0: 'string', 1: 'string'}
no matter what i pass toarrayLimit
... hope i'm not missing something here. thanks. https://codesandbox.io/s/musing-alex-l8i2h7?file=/src/App.js