Returning a item in an array based on the variable?

Hey,

I have an array (see below), I have a varaible in a data-store and was wondering how I search for the key in the array and return the item?

I just want to return the value of the key in the array so if the key is AUD return 299.00

2 Likes

Hi @Chris_Bradley
If the variable is always same, then we can use switch module or function to achieve this.

Best regards,
Msquare Automation
Platinum Partner of Make
@Msquare_Automation

1 Like

Hi @Chris_Bradley

Here is an example workflow

We are setting key as AUD

We have used your sample structure:

Now this is the sample workflow:

Use switch module to get the correct output:

Now you can map the output variable from switch module:

Final output:

Best regards,
Msquare Automation
Platinum Partner of Make
@Msquare_Automation

2 Likes

thanks heaps. got it!