Add calculated column from values of an item to that item

Hello,

I would like to add a column per item in an item list which is a calculated value between two columns I paste an API response as an example. I think a good approach would be to use the Function node, loop the items object and get the values and then divide them. In the example shared workflow I would divide tvl/cmcId and set this value in a new attribute / column.

Please share the workflow

Thanks!

Add a function item node with the following code.

item.calculation = item.tvl/parseInt(item.cmcId)
return item
Example workflow

Thanks! One last thing! I would like that the calculated field named mc/tvl. Is it possible?

item["mc/tvl"]= item.tvl/parseInt(item.cmcId)
return item