Ask coding questions

← Back to all posts
How to get every repl.it database key with a certain value?
beatsnationyt (0)

I'm in need of a way to find every key with a certain value in repl.it. Node.js isn't my strongsuit and I cannot find any other articles related to this.

Answered by AzureDev (22) [earned 5 cycles]
View Answer
Comments
hotnewtop
AzureDev (22)

Since you said "with", I'm assuming it's includes, and you'll need .match instead of ===.

Coder100 (19279)

You can use the prefix to get every key with a prefix. Beyond this, you could just use a loop: