JSON log to debug before making a data record

hello everyone, today I need something like a JSON log to debug before making a data record.

Why can’t I display the entire object as shown in the preview? Many thanks in advance

Jens

Hi, it’s because it’s an object and thus can’t be bound to a text component. You can use the ENCODE_JSON formula to transform your object to a string to make it compatible:

1 Like

Thanks Mari,

that’s almost what I was looking for. If I see this correctly, I only see list objects that also have a value. I am particularly interested in those where the value is NULL. Is this possible to show them as well?

Hi, you could use DEFAULT to default to a string if the property value is empty.
However in this case you’ll have to to do some extra work and print each property separately, as you unfortunately can’t iterate over an object’s properties:

"ID: " + ENCODE_JSON(DEFAULT(appVars.variable1.id, "novalue"))
ID: novalue if the id property is nully

Hi Mary, that’s exactly what I was looking for. Thanks a lot.

Jens

1 Like