I have looked at every MAP, SET_KEY, LOOKUP etc on the forum and my mind is not getting something that has to be simple.
REST API data loaded from dataVar to appVar - no problem, I let the AppVar get schema from dataVar with set appVar node.
The problem is when I need to copy a subset of fields from one appVar to another.
appVar.restApiData to appVar.fewerProperties
appVar.restApiData Schema (simplified)
id : 99999
[…] several more
appVar.fewerProperties (manually created and properties added)
stat1 : -1
What I need to do is copy
appVar.restApiData.id to appVar.fewerProperties.id
appVar.restApiData.name to appVar.fewerProperties.name
It’s so simple, but I can’t find the right combo of formulas.
I manage to get one entry into appVar.fewerProperties but never the entire list from the appVar.restApiData. It is a short list currently at 18 entries.
I have the IF (fake for loop) working just fine. Setting a loop counter.
I cycle through all 18 entries, popping up a toast to see that it is working.
I end up with 1 entry,  getting a value but not the other 17 undefined.
So could someone tell me the step inside the If/For loop that copies all 18 entries? @Mari since you seem to answer this question so often.
Before you ask here are some attempts. You can see I am lost. an long winded vars. if you do an example for me just use the simple vars above instead of these below.
MAP<m>(appVars.campaignsAppVar, IF(index == appVars.loopPosition001AppVar, SET_KEY(m,“campaignId”, LOOKUP(appVars.CRVTactiveCampaignsAppVar[appVars.loopPosition001AppVar], “campaignId”)),m))
MAP(appVars.campaignsAppVar,IF(index == appVars.loopPosition001AppVar,SET_KEY(item, “campaignId”, appVars.CRVTactiveCampaignsAppVar[appVars.loopPosition001AppVar].campaignId), item))
MAP<campaigns>(appVars.campaignsAppVar,SET_KEY(campaigns, “campaignId”, appVars.CRVTactiveCampaignsAppVar[appVars.loopPosition001AppVar].campaignId))