How can I find a json string with a variable ?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Kapsulon

Okay so, I want to print a certain json index, my line is this:

print(dialog_test[language].d01)

I want to replace the “d01” with a variable but its not working :frowning:

Any help would be appreciated :slight_smile:
Thanks in advance.

What does this d01 mean? Can you show what your json looks like?

Zylann | 2019-08-30 12:42

:bust_in_silhouette: Reply From: Eric Ellingson

Is this what you’re looking for?

var key = "d01"
print(dialog_test[language][key])