You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @ngdnghia28 I'm not so sure how to handle your request safely. As the filter query param is not traversed (because it's structure is totally unknown to the library) but simply JSON parsed. It can be tricky to exclude/include keys since the keys position can be deep in the JSON tree (if you combine $and, $or, $elemMatch, etc operators)
Any idea?
Isn't it possible to recursively traverse the object, and if a key is not started with a $ sign, and is not in the whitelist array, then remove it? I'm not sure of other edge cases it might have, but it seems possible
Will print out:
Expected result:
The text was updated successfully, but these errors were encountered: