If you want to do it in a no-code way, then you can use the Set node. But I am curious to know why you want to add it to a specific line. Can you help me understand it?
@harshil1712
I understand that my question is a bit strange. Here is my process.
in the node fonction_pivot, I don’t know how to get a compound key (key === ‘order_id’ + ‘marketplace_id’) and not have the repetition of the marketplace_id value in the result.
[
{
"order_id": "123456",
"order_line_items/order_line_item/1/marketplace_id": "2020.000.0000000",
"order_line_items/order_line_item/1/order_line_item_id": 978452,
"order_line_items/order_line_item/1/sku": "XXXXXXXXXXXXXX",
"order_line_items/order_line_item/1/quantity": 2,
"order_line_items/order_line_item/1/status": "CANCEL",
"order_line_items/order_line_item/2/marketplace_id": "2020.000.0000000",
"order_line_items/order_line_item/2/order_line_item_id": 978453,
"order_line_items/order_line_item/2/sku": "XXXXXXXXXXXXXX",
"order_line_items/order_line_item/2/quantity": 2,
"order_line_items/order_line_item/2/status": "SHIPPED",
"order_line_items/order_line_item/3/marketplace_id": "2020.000.0000000",
"order_line_items/order_line_item/3/order_line_item_id": 978451,
"order_line_items/order_line_item/3/sku": "XXXXXXXXXXXXXX",
"order_line_items/order_line_item/3/quantity": 1,
"order_line_items/order_line_item/3/status": "REFUND"
}
]```
I was thinking of adding it in the output json.
thanks
Thanks for sharing more details. Are you fetching the marketplace_id from Postgres? In the input data you shared earlier, there is no marketplace_id. Also, can you explain what you mean by compound key? In the expected output, I don’t see order_id + marketplace_id.