Add the same variable data to multiple JSON objects in an array

Answered

Hi,

I have been struggling all day to figure this out.

The workflow is as follows:

A user create a new analysis. This adds data to another table with name and ID.

For each analysis i want to add another table (called equipment). Each line in the database should reference the analysis ID so that i can later reference the equipment to the analysis.

I am using the bulk add records in my function stack, so i figured that i would have to change the JSON objects from the input and add the analysis ID.

But as you can see to the right, i cant add it correctly. I want a key for each object to be called "analysis" with the value as the analysis_id.

How should I solve this?

2
2 replies