We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I don't know if this issue kind of duplicate with #471 So I've tried to stringify an object
const obj = { $lookup: { '*': [ { products: { $lookup: { '*': ['categories'], }, }, }, ], }, }; const queryString = qs.stringify(obj, { encodeValuesOnly: true }); console.log(queryString); // $lookup[*][0][products][$lookup][*][0]=categories
Then, using the stringify result to parse back to object again
const queryObject = qs.parse(queryString); console.log(JSON.stringify(queryObject, null, 2)); // { // "$lookup": { // "*": [ // { // "products": { // "$lookup": { // "*": { // "[0]": "categories" // } // } // } // } // ] // } // }
as we can see, the parsed result is not the same as original object Please kindly check it @ljharb
The text was updated successfully, but these errors were encountered:
The issue is the depth - qs.parse(queryString, { depth: 50 }); produces the expected object, for example. The default of depth in the docs is 5.
qs.parse(queryString, { depth: 50 });
depth
Sorry, something went wrong.
No branches or pull requests
I don't know if this issue kind of duplicate with #471
So I've tried to stringify an object
Then, using the stringify result to parse back to object again
as we can see, the parsed result is not the same as original object
Please kindly check it @ljharb
The text was updated successfully, but these errors were encountered: