Add a new value to an existing JSON

Hi, I am trying to add a value that I always need to add to an existing JSON.
The thing is that my JSON is created and parsed, but I haven’t had any success using the module “Text aggregator”

I need to add a new value to the JSON that looks like this:

{"lineItems":[{"price":"9.25","title":"TEST1","quantity":2,"variant_id":"454"},{"price":"9.25","title":"TEST2","quantity":1,"variant_id":"456"}]}

How can I add a new value to this array?

Thanks!

Do you want to add new vales inside the array or in the root one i.e on same Hierarchy as of the lineItems?

If you want to add new key inside the lineitems array you can modify the Create JSON module and include new key over there.

1 Like

I want to include new item to the array with the same structure.

So the current array is conformed by items that have this structure:

{"price":"9.25","title":"TEST1","quantity":2,"variant_id":"454"}

I want to add a new of this items to the array.