How to format response properly

Hi Guys! I’m using an API to transcribe my audio files and this is a sample of the response I get:

(note that this sequence repeats for each paragraph in the transcription)

{
“paragraphs”: [
{
“text”: “You know, demons on TV like that. And and for people to expose themselves to being rejected on TV or, you know, humili humiliated by Fear Factor or, you know.”,
“start”: 430,
“end”: 11640,
“confidence”: 0.99871

I can display each “paragraph’s” “text” joined by arbitrary text (line break), however I would like to also display the time stamps at the top of each paragraph. Does anyone know how to set up the API response to display this info to me? This is how I have it set currently:

bump :grinning:

Hi @kevin31 When you initialize the API call, you can map all the fields from the response. Are you using API call as Data or Action?

Hey! I’m using it as “data”. I am successfully “passing through” the info that I need from the API, the challenge is I can’t format it how I need.

i.e.

I’m currently asking the API to show me each paragraph joined with a line break. I could then tell it to show me all time stamps joined with a line break but then the info would like so:

paragraph
paragraph
paragraph
timestamp
timestamp
timestamp

However, I’m trying to display the data like so:

timestamp
paragraph
timestamp
paragraph
and so on…

Any ideas on how to achieve this?

I think you will need a repeating group for this.
I can’t test it rn but this may work. Use the api as action, save all the paragraphs from the response and their timestamps to a custom state (a list of things with 3 fields : Paragraph, Start, End), and then use that custom state as the data source for the RG. In the RG cell you can format and design layout for paragraphs and timestamps as you like :slight_smile: