Here is are the snapshots that has the output information after I choose languages and click 'Submit' in my Web page:
As you can see, the languages I have chosen in my web page (Spanish and Thai) seemed to be passed properly via JSON to Azure. The problem is that, the For Each loop runs only once and out puts only one caption.vtt file on to a OneDrive folder.
The expected behavior should that the for each loop iterates two times(since there are two languages) and should output two caption.vtt files(Spanish and Thai) onto a OnDrive folder.
Why is my For Each loop running only once and outputting only one VTT file onto OneDrive? Looking at the snapshots, it looks like (It should be running twice and outputting two files) How to fix this logic app issue, so that it outputs two caption,vtt files(one for each language )?
As said in the chat, the issue is not a logic app iteration issue: your logic app is iterating twice as your capture is showing (1 of 2, 2 of 2).
Your issue is in your implementation: you don't see 2 results, because your create file step is creating 2 files with the same name.
Change your filename in your Create File operation, to have 2 different name (so use a variable from your foreach loop) and you're done