These variables are in a part of the workflow that will get re-run a few times. For each time it reruns, I need the [0] to increase one intertager. This is so that it pulls the next data point in the array.
I am trying to pull from an array that is named “initVars” that counts the number of blogs that are created. My thinking is that I can pull that increased number into the [0] part so that it pulls each new data point for each time it runs through,
When I incorporate subexpressions in my handlebar variable, it stops resolving for almost all of them. I am not sure what to really do here.
I think you might be pushing the limits of handlebars a bit there
If I were you, I would look into creating a simple custom function in the preceding step that sets an intermediary variable for the current iteration. So you could have a function that is just like:
const currentIndex = initVars.length; // or however you are computing which post you are on
ai.vars.currentPost = ai.vars.contentPlan.brandPosts[currentIndex];
And then in the block you could just do {{get currentPost "$.title"}}.
You might also want to consider using the Run Workflow block in array mode, which would have the added benefit of allowing you to run all of these in parallel (much faster!).
You can add in handlebars, assuming your variable is an integer - {{add yourVar integerToAdd}}. I discovered the new iterate function when running a child workflow, must say it’s a massive upgrade. Mindstudio has really stepped up their game and become much more useful for me.