Triggering pipeline in a loop based on the number of elements in a variable

Hello! I was wondering if anybody has experience with triggering a specific gitlab pipeline yml file from the main pipeline file. I am looking to trigger a pipeline file multiple times with different variables. The variables are going to be read from json file, or tokenized string var, and the piepline will be triggered as many times as there are elements in the var (or a file). I was looking into restful call to trigger a pipeline, but it looks like there is only an api to trigger the main pipeline of a project. There is also an “include” keyword but I’m not sure it can be run in the loop. Also, there are many references to a trigger keyword, but again, I think it only addresses triggering one pipeline at a time. Any hints are appreciated!