Find all the positions containing "text" in text?

I basically need to know where are the positions of specific text in a text.
I made my own code that works but it’s super slow and i need to work with json files that are more than 250kb in size.


i would love to be able to use Starts At block but i didn’t find any way to make it working
I know how could it be done.
search for the “text” in text and store that pos into variable, then search for another one by setting
the starting pos to variable+lenght of “text” (to skip the first result) but when im trying to make loop until there are all, it doesn’t work…

can you please help me?
Thank you.
PS: I couldn’t find any solution on any of the forums. not even app inventor etc. that’s why I’m asking.

Use Dictionary component to parse JSON file. See this by @WatermelonIce:

4 Likes

that… could be probably easier and the solution, but still don’t have any idea to search from it I was trying 5 hours already making this to work and it still doesn’t work… If you wouldn’t mind, could you create easy code that will find the “v”: "composition: from text:
scene.json.txt (258.8 KB)
using this dictionary…
i have tried some of the examples and tutorials and still don’t know how to find this…

try this:


try this:

sorry for the picture, I’m out and about and using my cell phone.

1 Like

Do as @Douglas_Maueski said. I think the app is taking time because of the length of JSON file. It is too big to be fetched instantly. :sweat_smile:

2 Likes

thank you so much. this really worked.

1 Like

Please mark @Douglas_Maueski answer as solution. He provided you the solution, not me. Thank you. :slight_smile:

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.