I'm working on a flow using the NHL API.
I am able to get an id number for a player on ice, for example 8474151.
I then want to use that number to lookup the name, which is contained in the same JSON response.
The Player ID (index 0)
returns the id to flow.player0ID
Now, I want to set flow.player0Name based on that returned ID.
The place where this data is stored is
I want to pass along that 7 digit number into that path (number) and then return the data to flow.player0Name.
I created a function node which inserts the number properly.
msg.payload = "payload.gameData.players.ID"+(get.flow("player0ID"))+".fullName" return msg;
But now I'm at a loss as to how to actually get the data. I try to put msg.payload into a switch node, but I just get my calculated function as a string.
How can I actually look up the data using that calculated string? I'm able to do another API call using the ID, but I'm trying to make it all happen in one.
Here's a screenshot of what I mean by the string being passed through: