How can I display the keys from a JSON object in a repeated row?


I have a JSON response that looks like this - lets call it JSON_RESPONSE:

“lodgement_datetime”: “2018-09-03 14:37:42”,
“current_energy_rating”: “D”,
“potential_energy_rating”: “D”,
“current_energy_efficiency”: “57”,
“potential_energy_efficiency”: “57”,
“property_type”: “Flat”,
“built_form”: “Detached”,
“construction_age_band”: “NO DATA!”,
“tenure”: “unknown”

I am trying to populate a table that looks like this:


I have tried to create a repeating row for JSON_RESPONSE[0] - which seems to repeat however I can’t figure out how to get the JSON object Key in one column and the JSON object value in the other.
This is a shorter JSON I have another with 75 entries I don’t want to spend hours hardcoding it.

Is there a way I can use the repeat function with this data to get a table like my image?
I have messed around with the formulas such as values(), keys(), repeated.current etc. but not getting anywhere.

I thought it would be as simple as repeat with JSON_RESPONSE[0]
Column A = current.key
Column B = current.value

but this is not an option !

any help is appreciated.


P.s. I have the JSON set to an AppVariable which is defined as a list of any values. Usually I then use formulas to navigate these AppVariables.

Check out the KEYS and VALUES functions and see if they might help. They would be needed to generate a list of keys and values from that object.

1 Like