Ask coding questions

← Back to all posts
Why can't you put nested dictionaries into a repl.it db?
Donoru

I'm trying to create a command line forum using a repl.it db. Setting a value to a dictionary works fine, but whenever I try to give the nested dictionary a value it gives me an error. Could someone help?

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
RishiNandhaVanc
Donoru
Comments
hotnewtop
Coder100

In the backend, all db types are strings, so perhaps the creators forgot to account for the dict type.

Donoru

@Coder100 Okay. Thanks!

Coder100

np! Mark as correct answer? @DonoruYT

Roboguy3000

@Coder100 is there a way around this? I ran into the same problem myself

Coder100

@Roboguy3000

Roboguy3000

@Coder100 Thanks man, worked like a charm!

Coder100
Coder100

OHHH I SEE!!

is a string, not a dict!

Donoru

@Coder100 okay. could you put some example code or fix what i have in a reply?

Coder100

did you maybe mean:

?
@DonoruYT

Coder100

If you unprivate the repl, sure

Donoru

@Coder100 oh wao i stoopid

Coder100

lol dw all hackers experience this @DonoruYT