See here how the data in the output is all after “0:” in each field.
How do I remove that and get it to output the data in the same way it is formatted initially? I.e. if it’s an array, then it outputs as an array, but if it’s a string, it outputs as a string, rather than a string inside an array.
Sorry I should have been more clear. I have used the Merge node before the Aggregate node, but it didn’t give me enough control to structure the data. It just merged both datas in a crude way. So I’m using Aggregate to try and structure the data, but even that isn’t giving me the right output.
I also tried Edit Fields (Set) as per your recommendation but it’s also outputting data over two items rather than combining into one output.
I tried just the Merge node on its own with one of the other two options:
Combine: Requires a matching item (but nothing in the two items matches).
Choose Branch: Only outputs one item.
So I’m not 100% clear on how to achieve the correct combination using the Merge node.
I tried the Edit Fields node on its own. This time, the structure is correct, but the output is not getting the data from the original node - so there are a lot of null values:
Would you mind sharing an example workflow which demonstrates how you get it to structure the data in the correct way?
Thanks, I tried the Merge option with “Merge By Position” and it looks like it might work, although the test data has two sets of “data” - and so it’s overwriting the first “data” with the second one (rather than merging). But that’s something I could probably fix.
Strange that the pinned data is null. This is the data I was using:
[
{
"method": "GET",
"data": {
"query": "Retrieve a summary of discussions around client",
"email": "[email protected]",
"startTime": "2024-03-22T00:00:00Z",
"endTime": "2024-03-25T00:00:00Z"
}
}
]