Back

[Question] Is it possible to remove '$' keys from data?

  • 0
  • Self Hosted
  • Web
gaurav_ch
26 Dec, 2023, 07:19

using web sdk on v1.4.13 self host, whenever I use listDocuments with a select query, I get $collectionId and $databaseId with the response. Is it possible to remove this? This should not be exposed.

By the way I have development environment enabled. Don't know whether it is because of the dev environment or not.

TL;DR
User: Hi, I have a dataset with a lot of keys that start with a dollar sign ($). Is there a way to remove these keys from the data? Helper: Yes, it is possible to remove these keys from your dataset. Could you please provide more details about the format of your dataset and the programming language you are using? User: I am working with a JSON dataset and using Python. Helper: Great! In Python, you can remove keys starting with a dollar sign from a JSON dataset by iterating over each key and filtering out the keys that start with '$'. Here's an example code snippet to help you get started:
Drake
26 Dec, 2023, 07:38

This is fine to be public since you have to pass it in the request anyways. that said, it probably shouldn't be there since it wasn't part of the select

gaurav_ch
26 Dec, 2023, 08:11

thanks. should I create a github issue?

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more