-
[Problem] Access multiple JSON files with RegEx and dynamically calculate y-Axis
I have multiple JSON files that I need to animate – each based on the same template.
The animation is a normal coordinate system and values for the x and y axis are nested in the JSON files. The graphic below shows the template and the layout for two different JSON files.
The problem is that the number of values for the x axis varies; meaning some JSON files only have 3 values, others 5, others 7, etc.
However, I want to have the x axis values in each animation evenly/symmetrically distributed on the x axis (the space in between the two red lines).
My first attempt was to count how many x values are in the JSON file and then distribute them along the x axis by dividing the pixel length of the axis by the number of values. But I failed to succeed here (How to count nest JSON values with expressions).
My other thought was to fix a first null and a last null and have all other values distributed in between them. No idea though how to do this with expressions.
Would anybody be able to help?