Passes the value not transformed
input:
NONE("string")
output:
"string"
Transforms the value into and integer
input:
INTEGER("12345")
output:
12345
Transforms the value into and float
input:
FLOAT(123)
output:
123.0
Transforms the value into and string
input:
STRING(12345)
output:
"12345"
Transforms the value into and map
input:
MAP([[ "Service":"InstaLink"], ["Rating": "\*\*\*\*\*"]])
output:
{ "Service": "InstaLink", "Rating": "\*\*\*\*\*" }
Transforms the value into an array
input:
ARRAY("string")
output:
["string"]
Transforms the value into a date. Can have a default value as a second argument
input:
DATE(9000)
output:
'1970-01-01T02:30:00.000Z'
input:
DATE('2017-08-29T21:45:03.129Z')
output:
'2017-08-29T21:45:03.129Z'
input:
DATE('Tue Aug 29 2017 11:00:49 GMT-0600 (MDT)')
output:
'2017-08-29T17:00:49.000Z'
input:
DATE("BadData")
output:
'1970-01-01T00:00:00.000Z'
input:
DATE("BadData",'2017-08-29T21:45:03.129Z')
output:
'2017-08-29T21:45:03.129Z'
Transforms the date value into a string
Valid Date Format Strings:
input:
DATE_TO_STRING(DATE("2017-08-30T17:36:23.077Z"), "UTC:ddd mmm dd yyyy HH:MM:ss")
output:
"Wed Aug 30 2017 17:36:23"
input:
DATE_TO_STRING(DATE("2017-08-30T17:36:23.077Z"), "UTC:mm/dd/yyyy")
output:
"08/30/2017"
Transforms the value into a timestamp
input:
TIMESTAMP(DATE(1000))
output:
1000
input:
TIMESTAMP('Tue Aug 29 2017 11:00:49 GMT-0600 (MDT)')
output:
1504026049
input:
TIMESTAMP(null, 'Tue Aug 29 2017 11:00:49 GMT-0600 (MDT)')
output:
1504026049
Transforms the value into a boolean
input:
BOOLEAN("TRUE")
output:
true
input:
BOOLEAN(null)
output:
false
input:
BOOLEAN(null, true)
output:
true
Retrieves a value from an array at the index specified
input:
ARRAY_GET(["salad", "potato"], 1)
output:
"potato"
input:
ARRAY_GET(["salad", "potato", "chicken", "waffles", "home", "fries", "banana", "shake"], -2)
output:
"banana"
input:
ARRAY_GET(["salad", "potato", "chicken", "waffles", "home", "fries", "banana", "shake"], 8, "casserole")
output:
"casserole"
Sets the value in an array at the index specified.
It can also fill in the size of the array specified with that value if the index is bigger than the current array size
input:
ARRAY_SET(["salad", "potato"], 1, "bacon")
output:
["salad", "bacon"]
input:
ARRAY_SET(["salad", "potato", "chicken", "waffles", "shake"], -2, "fries")
output:
["salad", "potato", "chicken", "fries", "shake"]
Removes the value in an array at the index specified.
input:
ARRAY_DELETE(["salad", "potato"], 1)
output:
["salad"]
input:
ARRAY_DELETE(["salad", "potato", "chicken", "waffles", "shake"], -2)
output:
["salad", "potato", "chicken", "shake"]
Returns the number of elements in the array
input:
ARRAY_LENGTH["salad", "potato", "chicken", "waffles", "shake"])
output:
5
Returns the first element in the array
input:
ARRAY_FIRST["salad", "potato", "chicken", "waffles", "shake"])
output:
"salad"
Returns the array with the first element removed
Equivalent to: ARRAY_DELETE(array,0)
input:
ARRAY_TAIL(["salad", "potato", "chicken", "waffles", "shake"])
output:
["potato", "chicken", "waffles", "shake"]
Returns the last element in the array
input:
ARRAY_LAST["potato", "chicken", "waffles", "shake"])
output:
"shake"
Returns the array with the last element removed
Equivalent to: ARRAY_DELETE(array,-1)
input:
ARRAY_INIT(["salad", "potato", "chicken", "waffles", "shake"])
output:
["salad", "potato", "chicken", "waffles"]
Returns the value from each object in an array that matches the path given
input:
ARRAY_PLUCK([ ['a'=>['b'=>['1']]], ['a'=>['c'=>'2'] ], ['a'=>['b'=>3]] ], 'a.b')
output:
[ ['1'] , 3 ]
Returns an element from a random location in the array
input:
ARRAY_SAMPLE(["salad", "potato", "chicken", "waffles", "shake"])
output:
"shake"
Transforms the value into an array
Same as ARRAY()
input:
ARRAY("string")
output:
["string"]
Joins multiple arrays together
input:
ARRAY_CONCAT(["salad", "potato"], "chicken", ["waffles", "shake"])
output:
["salad", "potato", "chicken", "waffles", "shake"]
Filters out map/objects from an array using a map, keeping all the non-matching items
input:
ARRAY_FILTER([['a'=>'pickme', 'b'=>'$5'], ['a'=>'not me','b'=>'$0']], ['a'=>'not me'])
output:
[['a'=>'pickme', 'b'=>'$5']]
Collect map/objects from an array using a map, keeping all of them matching the key=>values
input:
ARRAY_MATCH([['a'=>'pickme', 'b'=>'$5'], ['a'=>'not me','b'=>'$0']], ['a'=>'pickme'])
output:
[['a'=>'pickme', 'b'=>'$5']]
Collect map/objects from an array using "path" of keys, keeping each of the first instances of the items having the key path that's passed in.
input:
ARRAY_UNIQEBY([['a'=>'pickme', 'b'=>'$5'], ['a'=>'not me','b'=>'$0']], 'a')
output:
[['a'=>'pickme', 'b'=>'$5']]
input:
ARRAY_UNIQEBY([['a'=>['b'=>'chicken'],'d'=>'gum'], ['a'=>['c'=>'dinner']], ['b'=>'apple']], 'a')
output:
[['a'=>['b'=>'chicken'], 'd'=>'gum'], ['a'=>['c'=>'dinner']]]
input:
ARRAY_UNIQEBY([['a'=>['b'=>'chicken'],'d'=>'gum'], ['a'=>['c'=>'dinner']], ['b'=>'apple']], 'b')
output:
[['b'=>'apple']]
input:
ARRAY_UNIQEBY([['a'=>['b'=>'chicken'],'d'=>'gum'], ['a'=>['c'=>'dinner']], ['b'=>'apple']], 'a.b')
output:
[['a'=>['b'=>'chicken'], 'd'=>'gum'])
input:
ARRAY_UNIQEBY([['a'=>['b'=>'chicken'],'d'=>'gum'], ['a'=>['c'=>'dinner']], ['b'=>'apple']], 'a[b]')
output:
[['a'=>['b'=>'chicken'], 'd'=>'gum'])
Sort the array by a key
input:
ARRAY_SORTBY([['a'=>2, 'b'=>9],['a'=>1, 'b'=>4],['a'=>3,'b'=>1]], 'a')
output:
[['a'=>1, 'b'=>4], ['a'=>2, 'b'=>9], ['a'=>3,'b'=>1]]
input:
ARRAY_SORTBY([['a'=>['b'=>2], 'b'=>9],['a'=>['b'=>1], 'b'=>4],['a'=>['b'=>3],'b'=>1]], 'a.b')
output:
[['a'=>['b'=>1], 'b'=>4], ['a'=>['b'=>2], 'b'=>9], ['a'=>['b'=>3],'b'=>1]]
input:
ARRAY_SORTBY([['a'=>['b'=>2], 'b'=>9],['a'=>['b'=>1], 'b'=>4],['a'=>['b'=>3],'b'=>1]], 'a[b]')
output:
[['a'=>['b'=>1], 'b'=>4], ['a'=>['b'=>2], 'b'=>9], ['a'=>['b'=>3],'b'=>1]]
Does a "Shallow" flattening of an array (only up to one level deep). Most Efficient
input:
ARRAY_FLATTEN([ ['a'], 'b', [['c']] ])
output:
['a', 'b', ['c']]
Does a "Deep" flattening of an array (infinite levels deep).
input:
ARRAY_FLATTEN_DEEP([ ['a'], 'b', [['c']] ])
output:
['a', 'b', 'c']
Joins an array into a string, inserting the dividing character between each element if supplied
input:
ARRAY_JOIN(['ba','a','a'],'n')
output:
"Banana"
input:
ARRAY_JOIN(['ba','a','a'])
output:
"Baaa"
Joins an array into a string, inserting the dividing character between each element if supplied
input:
ARRAY_REVERSE(['x', 'y', 'z', 'p', 'd', 'q'])
output:
['q', 'd', 'p', 'z', 'y', 'x']
Pivots an array of arrays
input:
ARRAY_TRANSPOSE([[1,2,3],[4,5,6]])
output:
ARRAY_TRANSPOSE([[1,4],[2,5],[3,6]])
Gets the array index for the first occurance of the desired element.
input:
ARRAY_GET_INDEX(['x', 'y', 'z', 'p', 'd', 'q'], 'y')
output:
1
Returns true if the array contains the element, and false if it isn't in the array
input:
ARRAY_CONTAINS(['x', 'y', 'z', 'p', 'd', 'q'], 'y')
output:
true
Returns a section of the array by passing in the indexes for the first element and the element after the last element to be captured.
input:
ARRAY_SUB(['x', 'y', 'z', 'p', 'd', 'q'], 2, 3)
output:
['z']
Groups objects/maps into subarrays using the key that's passed in as what to group them with
[['a'=> 1, 'b'=> 2], ['a'=> 4, 'b'=> 2], ['a'=> 4, 'b'=> 4], ['a'=> 1, 'b'=> 6], ['a'=> 3, 'b'=> 4]]
input:
ARRAY_GROUP_BY([['a'=>1,'b'=>2],['a'=>4,'b'=>2],['a'=>4,'b'=>4],['a'=>1,'b'=> 6],['a'=>3, 'b'=>4]], 'a')
output:
[ [['a'=>1,'b'=>2],['a'=>1,'b'=> 6]], [['a'=>4,'b'=>2],['a'=>4,'b'=>4]], [['a'=>3, 'b'=>4]] ]
Goes through an array of objects/maps and combines them together into a single map, aggregating on the map passed in as the aggregate template
aggregate types:
input:
ARRAY_AGGREGATE([ ['item'=>'abc', 'qty'=>2], ['item'=>'abc', 'qty'=>3] ], [['qty','sum']])
output:
['qty'=>5]
input:
ARRAY_AGGREGATE([ ['item'=>'abc', 'qty'=>2], ['item'=>'abc', 'qty'=>3] ], [['qty','sum', 'item','first']])
output:
['qty'=>5, 'item'=>'abc']
Goes through an array of objects/maps, groups them together based on the grouping key, and then combines each of the groups together into a single map in each group, aggregating on the map passed in as the aggregate template
aggregate types:
input:
ARRAY_GROUP_AGGREGATE([ ['item'=>'abc', 'qty'=>2], ['item'=>'abc', 'qty'=>3] ], 'item', [['qty','sum']])
output:
[['qty'=>5]]
input:
ARRAY_GROUP_AGGREGATE([ [['item'=>'abc', 'qty'=>2], ['item'=>'abc', 'qty'=>3]] ], 'item', [['qty','sum', 'item','first']])
output:
[['qty'=>5, 'item'=>'abc']]
Combines two arrays together, removing any duplicate keys
input:
ARRAY_UNION([1,2,3],[2,3,4],[5,6,7])
output:
[1,2,3,4,5,6,7]
input:
ARRAY_UNION([ [1,2,3],[2,3,4] ] , [ [5,6,7] ])
output:
[ [1,2,3,4,5,6,7] ]
Returns all the items that exist in the left hand side that don't exit on the right
input:
ARRAY_DIFFERENCE([1,2,3],[2,3,4])
output:
[1]
input:
ARRAY_DIFFERENCE([ [1,2,3],[2,3,4] ] , [ [4,5,6,7] ])
output:
[ [1,2,3] ]
Returns all the items that exist in both the left hand side and the right hand side
input:
ARRAY_INTERSECTION([1,2,3],[2,3,4])
output:
[2,3]
input:
ARRAY_INTERSECTION([ [1,2,3],[2,3,4] ] , [ [4,5,6,7] ])
output:
[ [4] ]
Converts an array of objects into an array of arrays with the first element of the inner array being a copy of a specified value in the object, and the second element being the original object.
input:
ARRAY_TO_MAP([['name'=>'Alice', 'ssn'=>'123'],['name'=>'Bob', 'ssn'=>'456'],['name'=>'Chuck', 'ssn'=>'789']],'name')
output:
[['Alice' => ['name'=>'Alice', 'ssn'=>'123']], ['Bob' => ['name'=>'Bob', 'ssn'=>'456']], ['Chuck' => ['name'=>'Chuck', 'ssn'=>'789']]]
Creates a new string consisting of the second string appended to the end of the first string
input:
TEXT_CONCAT("SoFly","ForAWiFi")
output:
"SoFlyForAWiFi"
Creates a new string consisting of the first string appended to the end of the second string
input:
TEXT_PREPEND("ForAWiFi", "SoFly")
output:
"SoFlyForAWiFi"
Creates a new string consisting of the second string appended to the end of the first string
input:
TEXT_APPEND("SoFly","ForAWiFi")
output:
"SoFlyForAWiFi"
Returns a section of the string starting at the index given going to the count of characters to the right.
input:
TEXT_SUB("Top of the morning",7,5)
output:
"the m"
Replaces all occurances of the substring/regex with the replacement string
input:
TEXT_REPLACE("Top of the morning", "morning", "day")
output:
"Top of the day"
Regex's can have flags for case insensitive searches and global replacement
input:
TEXT_REPLACE("Top of the morning", "/o/g", "0")
output:
"T0p 0f the m0rning"
Returns the length of the string that is passed in
input:
TEXT_LENGTH("Top of the morning")
output:
18
Returns a copy of the string all lowercased
input:
TEXT_LOWER_CASE("Top of the morning")
output:
"top of the morning"
Returns a copy of the string all uppercase
input:
TEXT_UPPER_CASE("Top of the morning")
output:
"TOP OF THE MORNING"
Returns a copy of the string with the first character of all the words capitalized
input:
TEXT_CAPITALIZE_WORDS("Top of the morning")
output:
"Top Of The Morning"
Returns a copy of the string with all the whitespace trimmed off of both sides of the string
input:
TEXT_TRIM(" Top of the morning ")
output:
"Top of the morning"
Returns a copy of the string with all the whitespace trimmed off of the left side of the string
input:
TEXT_TRIM_LEFT(" Top of the morning ")
output:
"Top of the morning "
Returns a copy of the string with all the whitespace trimmed off of the right side of the string
input:
TEXT_TRIM_RIGHT(" Top of the morning ")
output:
" Top of the morning"
Splits the string based on the substring passed in
input:
TEXT_SPLIT("Top of the morning", " ")
output:
["Top","of","the","morning"]
Splits the string on newlines
input:
TEXT_LINES("Top\nof\nthe\nmorning")
output:
["Top","of","the","morning"]
Splits the string on spaces
input:
TEXT_SPLIT("Top of the morning", " ")
output:
["Top","of","the","morning"]
Returns a boolean value representing if the left hand argument is less than the right argument
input:
LESS_THAN(0,2)
output:
true
Returns a boolean value representing if the left hand argument is greater than the right argument
input:
GREATER_THAN(0,2)
output:
false
Returns a boolean value representing if the left hand argument is less than the right argument
input:
LESS_THAN_OR_EQUAL(0,2)
output:
true
Returns a boolean value representing if the left hand argument is greater than the right argument
input:
GREATER_THAN_OR_EQUAL(0,2)
output:
false
Returns a boolean value representing the arguments are both the same
input:
EQUAL(2,2)
output:
true
Returns a boolean value representing the arguments are both different
input:
NOT_EQUAL(2,2)
output:
false
Returns a boolean value representing the arguments are both true
input:
AND(true,true)
output:
true
Returns a boolean value representing either arguments are true
input:
OR(true,false)
output:
true
Returns true when only one argument is true
input:
XOR(true,false)
output:
true
input:
XOR(true,true)
output:
false
Returns how many years ago the first date is from the second date
input:
DATE_YEARS_AGO('2017-08-30T17:36:23.077Z', '2017-08-30T17:36:23.077Z')
output:
0
input:
DATE_YEARS_AGO('2016-08-30T17:35:23.077Z', '2017-08-30T17:36:23.077Z')
output:
1
Returns how many months ago the first date is from the second date
input:
DATE_MONTHS_AGO('2017-08-30T17:36:23.077Z', '2017-08-30T17:36:23.077Z')
output:
0
input:
DATE_MONTHS_AGO('2016-08-30T17:35:23.077Z', '2017-08-30T17:36:23.077Z')
output:
12
Returns the current date
input:
CURRENT_DATE()
output:
'2018-07-01T17:35:23.077Z'
whatever the current date is
Returns the current date and time as a unix timestamp
input:
CURRENT_TIMESTAMP()
output:
1530466523
whatever the current date/time is
Returns the year from a timestamp
input:
DATE_YEAR('2017-08-30T17:36:23.077Z')
output:
2017
Returns the month number from a timestamp
input:
DATE_MONTH('2017-08-30T17:36:23.077Z')
output:
8
Returns the month name
input:
DATE_MONTH_STRING('2017-08-30T17:36:23.077Z')
output:
'August'
Returns the day of the month
input:
DATE_DAY_OF_MONTH('2017-08-30T17:36:23.077Z')
output:
30
Returns the numeric day of the week, starting with Monday as 1
input:
DATE_DAY_OF_WEEK('2017-08-30T17:36:23.077Z')
output:
3
Returns the name of the day of the week
input:
DATE_DAY_OF_WEEK('2017-08-30T17:36:23.077Z')
output:
'Wednesday'
Returns the date passed in, with the seconds set to zero
input:
DATE_TRUNCATE_TO_MINUTE('2017-08-30T17:36:23.077Z')
output:
'2017-08-30T17:36:00.000Z'
Returns the date passed in, with the minutes and seconds set to zero
input:
DATE_TRUNCATE_TO_HOUR('2017-08-30T17:36:23.077Z')
output:
'2017-08-30T17:00:00.000Z'
Returns the date passed in, with the hour, minutes and seconds set to zero
input:
DATE_TRUNCATE_TO_DAY('2017-08-30T17:36:23.077Z')
output:
'2017-08-30T00:00:00.000Z'
Returns the date passed in, with the day, hour, minutes and seconds set to zero
input:
DATE_TRUNCATE_TO_MONTH('2017-08-30T17:36:23.077Z')
output:
'2017-08-01T00:00:00.000Z'
Returns the date passed in, with the month, day, hour, minutes and seconds set to zero
input:
DATE_TRUNCATE_TO_YEAR('2017-08-30T17:36:23.077Z')
output:
'2017-01-01T00:00:00.000Z'
Returns the equivalent of multiplying the number by negative one
input:
MATH_NEGATE(9)
output:
-9
input:
MATH_NEGATE(-0.4)
output:
0.4
Returns the sum of the two arguments
input:
MATH_ADD(9,2)
output:
11
Returns the difference of the two arguments
input:
MATH_SUBTRACT(9,2)
output:
7
Returns the product of the two arguments
input:
MATH_MULTIPLY(9,2)
output:
18
Returns the quotient of the two arguments
input:
MATH_DIVIDE(9,2)
output:
4.5
Returns the integer quotient of the two arguments
input:
MATH_DIVIDE_INT(9,2)
output:
4
Returns the integer remainder of the quotient of the two arguments
input:
MATH_REMAINDER(9,2)
output:
1
Returns the product of the first argument to the power of the second argument
input:
MATH_POWER(9,2)
output:
81
Returns the square root of the argument
input:
MATH_SQUARE_ROOT(81)
output:
9
Returns the cube root of the argument
input:
MATH_CUBE_ROOT(27)
output:
3
Returns the positive version of the argument
input:
MATH_ABSOLUTE_VALUE(-7)
output:
7
Returns the number, rounded up to the nearest whole number
input:
MATH_CEILING(7.1)
output:
8
Returns the number, rounded down to the nearest whole number
input:
MATH_FLOOR(7.1)
output:
7
Returns the number, rounded towards zero. (if it's negative, it gets rounded up. If it's positive, it's rounded down)
input:
MATH_TRUNCATE(-7.1)
output:
-7
Returns the number, rounded down to the nearest whole number if it's less than half way to the next largest whole number, otherwise it's rounded up
input:
MATH_ROUND(-7.1)
output:
-7
Returns a random number less that the number passed in, but greater than 0
input:
MATH_RANDOM(14)
output:
10.0
Returns a random number less that the number passed in, but greater than 0, as a whole number
input:
MATH_RANDOM(14)
output:
10
Retrieves a value from a key=>value pair map
input:
MAP_GET(["salad"=>"potato"], "salad")
output:
"potato"
input:
MAP_GET(["salad"=>"potato"], "fries", "casserole")
output:
"casserole"
Transforms objects and arrays into an array of arrays, with each of the child arrays containing a key,value
pair
input:
MAP_PAIR(["salad","potato"])
output:
[[0,"salad"],[1,"potato"]]
input:
MAP_PAIR(["salad"=>"potato"])
output:
[["salad","potato"]]
Returns true or false, depending on if the key exists in the map/object
input:
MAP_HAS(["salad"=>"potato"], "salad"))
output:
true
input:
MAP_HAS(["salad"=>"potato"], "chicken"))
output:
false
Returns the number of key value pairs that are in the map/object
input:
MAP_SIZE(["salad"=>"potato"]))
output:
1
input:
MAP_SIZE(["salad"=>"potato", "chicken"=>"frys"]))
output:
2
Combines two or more maps/objects together into one map. If there are multiples of the same key, the last map with that key is used for that key value pair
input:
MAP_MERGE(["salad"=>"potato", "chicken"=>"waffles"], ["chicken"=>"fries", "banana"=>"shake"] )
output:
["salad"=>"potato", "chicken"=>"fries", "banana"=>"shake"]
Returns all the keys for a map as an array
input:
MAP_KEYS(["salad"=>"potato", "chicken"=>"waffles", "home"=>"fries", "banana"=>"shake"] )
output:
["salad", "chicken", "home", "banana"]
Returns all the values for a map as an array
input:
MAP_VALUES(["salad"=>"potato", "chicken"=>"waffles", "home"=>"fries", "banana"=>"shake"] )
output:
["potato", "waffles", "fries", "shake"]
Returns a map with the specified key set to the value passed in
input:
MAP_SET(["salad"=>"potato"], "salad", "carrot" )
output:
["salad"=>"carrot"]
Returns a map with the specified key removed
input:
MAP_DELETE(["salad"=>"potato", "chicken"=>"waffles", "home"=>"fries", "banana"=>"shake"], "salad")
output:
["chicken"=>"waffles", "home"=>"fries", "banana"=>"shake"]
Returns the base 64 representation of the string passed in
input:
ENCODE_BASE64('abc')
output:
'YWJja'
Returns the regular string representation of the base 64 string
input:
ENCODE_BASE64('YWJja')
output:
'abc'
Returns the JSON representation of the map passed in
input:
ENCODE_JSON({a: 1})
output:
"{'a': 1}"
Returns the regular string representation of the json map
input:
DECODE_JSON("{'a': 1}")
output:
"{'a': 1}"
Returns a CSV string representation of the array of objects passed in
input:
ENCODE_CSV([{'a': 1, 'b': 'lmnop'}])
output:
'"a","b"\r\n"1","lmnop"\r\n'
Returns a URI escaped string representation of the string passed in
input:
ENCODE_URI('%20 /apples&birds , whatevs')
output:
'%2520%20%2Fapples%26birds%20%2C%20whatevs'
Returns the decoded representation of the string passed in
input:
ENCODE_URI('%2520%20%2Fapples%26birds%20%2C%20whatevs')
output:
'%20 /apples&birds , whatevs'
The syntax for a map is the key / value pair separated by a =>
(rocket), inside square brackets []
.
[ "duck"=>"billed" ]
If there are multiple pairs, the pairs a separated by a comma from the previous pair, but still inside the original brackets.
[ "duck"=>"billed", "quick" => "witted" ]
a block looks like the following:
{ |x| x < 1 }
${KEY:0}
gets the loop counter closest to the root
When you have logic that you want to set the result variable to 2 or more different values depending on conditions,MAP_GET
can help.
If you want to write something similar to:
If (VALUE == 1) then
RESULT = "did it"
else
RESULT = "didn't do it"
end
You could do that like this:
MAP_GET([1=>"did it"], VALUE, "didn't do it")
You could also do many conditions in a similar manner, just add it to the key value pair. So something like:
If (VALUE == 1) then
RESULT = "did it"
else if (VALUE == 2) then
RESULT = "did something else"
else
RESULT = "didn't do it"
end
would be written as:
MAP_GET([1=>"did it", 2=>"did something else"], VALUE, "didn't do it")
MAP_GET
could be used in a similar manner for conditionally doing other logic if instead of returning strings, you call other methods instead. If you were wanting to do something like:
if (VALUE == 1) then
RESULT.first_name = "Oscar"
else if (VALUE == 2) then
RESULT.last_name = "Meyer"
else
RESULT.error = "DIDN'T SET NAME"
end
This could be written as:
MAP_GET([ 1=>MAP_SET(${my_vals},"first_name", "Oscar"), 2=>MAP_SET(${my_vals},"last_name", "Meyer")],VALUE, MAP_SET(${my_vals}, "error" => "DIDN'T SET NAME"))
my_vals
as the output variable