-
I am wondering if there's a simple way to store all user input in a dictionary? The only way I see it do it is to use |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi Erin.
from h2o_wave import main, app, Q, ui, copy_expando, Expando, expando_to_dict
# Convert expando to dict.
expando_dict = expando_to_dict(copy_expando(q.args, Expando())) The last approach is considered safest for most of the scenarios since mutating the newly created dict would not change the original Expando (q.args) as well. |
Beta Was this translation helpful? Give feedback.
Hi Erin.
q.args
is an object of typeExpando
, which is just a fancy wrapper for python dict. This meansq.args
and store them in yourdict
of choice for further processing.The last approach is considered safest for most of the scenarios since mutating the newly created dict would not change the original Expando (q.args) as well.