How to transform db JSON text to regular text?

I’ve used PREVIEW: Using JSON Database Fields to Store Multiple Choices to store answers in the database.
This works well, if I type the following:

This is saved In the database (I’ve put the answer column type to ‘array’):

But I need help with retrieving the data again.

When I query for this info I get this as the result:

However, I want this to show as ‘plain text’. So it should be stripped of the formatting.

I tried to use {{answer[0]}} but that doesn’t work.
I have a feeling I need to parse this json into text somehow, but a bit lost on how to proceed?

When I retrieve my Json I use .parseJSON() in a set value step with the returned Json value from the database or repeat etc.

Something to try still learning Json myself atm.

Screenshot of my setup for reference

users_content_module is just a value returned by my database query I believe you need to add the parse in code I couldn’t find it in the UI

Thank you so much! I tried it out and this is exactly what I need. Had to put it in a repeat just like you did.

It’s outputting exactly what I want now…

Please, please, please tell me your secret on how you found this formatter: .parseJSON()
I’ve been searching like a mad man for this formatter the last hour… I tried to apply this code: JSON.Parse(myJSON) but that didn’t work (it’s just javascript, not a formatter).

I found a few posts on here about it typing .parseJSON will find you some of them but before that I was just typing Json and checking the results

Still getting used to Json as nested structure seems to all be needed to be done in code view atm from what ive seen

1 Like