Help with extracting only some data from a JSON array

Hey there,

Im grabbing some data via API from both the body and an array within the body.

The arrray has data that looks like this in postman:
image

In the workflow, I insert the result into a text field using add
image

Heres the whole step for clarity

Now I want to be able to grab just text spoken between two times. I can filter within the array for start time so it would be something like where each items start is > StartTime and < End time, but Im not sure how to approach this in the workflow.

Should I create a new type fill that, then filter to the displayed data type or can this be done in one step?

Advice appreciated :smiley:

Just filter the results of step 2, so as only to include results more than or less than the relevant times.

Thanks @adamhholmes , do you mean in the “Results add” section? just tack on filtered:?

About to give myself a head-slap for not thinking of that

Yeah exactly… after Results of step 2 (rapid API - Youtu...)'s body: each item's transcription add the :filtered operator, and filter by start

Thanks for the help - I think I went down this rabbit hole, the issue is I’m not filtering on the item Im adding but on it’s equivalent start value in the array . .

So do I filter for that here?

No… you need to filter the transcription array (not the subtitles)…

So , like I said, apply the filter to the transcriptions, rather than the subtitles.

Awesome - thanks again for the response @adamhholmes that resolved it

Lesson for me was that :filtered didn’t need to be at the end. It can go wherever the logic requries it :slight_smile:

For the record, this was the corrected approach
image

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.