Hi all - I've been banging my head against a wall all day, and I'm hoping someone can put me out of my misery.
I have a function with 2 (relevant) inputs:
items - json, which has all of the values that need to be added to a table. Within this json/table there is a 'fw_categories_id' field
cat_refs - object, which a list of 'WeWeb' category IDs and the associated 'Xano' category ID
I am saving my items to a variable, and then looping through each of those items (as 'item_loop'). The purpose of the loop is to:
Look up the 'fw_categories_id' value of the 'item_loop'
Find that category ID in the 'cat_refs' object in the 'WeWeb' field, and return the associated 'Xano' category ID
Update the 'fw_categories_id' value of the 'item_loop' with the returned 'Xano' category ID
So in a nutshell, I'm trying to replace the 'fw_categories_id' value (which is from WeWeb) with the associated Xano category ID from the 'cat_refs' table.
I have the loop working and can update the 'fw_categories_id' value of the looped item with a constant. I would like help to update the 'fw_categories_id' with the returned Xano category ID.
I have included a screenshot from the debugger below to show the structure of the inputs. In this example, the goal for the function would be to transform 'items' so that fw_categories_id for id=1 would be 2600 (instead of 1600) and for id=2 it would be 2601 (instead of 1601).
Big thanks in advance!