This article covers the demonstration of execution of other formulas when a text or URL is passed in the formula mode.
What you'll need:
Skill level: Intermediate
Time required: 5 minutes
- Skills for understanding bas64 content
Let's take an example text Hello world and tweak it with the following formulas:
- encodeUrl
- decodeUrl
- encodeBase64
- decodeBase64
- pluck
- findAndReplace
- join
- last
1) encodeUrl
This formula encodes a text provided as input:
Output:
2) decodeUrl
This function helps to decode the URL text. Let's decode the above result:
Output:
3) encodeBase64
Encode a text using the base64 algorithm:
Output:
4) decodeBase64
Decode a text using the base64 algorithm. Let's decode the above base64 result:
Output:
5) pluck
This function helps in extracting a list of specific properties from each item/element present in an array. It comes with a syntax .pluck("")
. Within the double quotes, specify the key element present in an array of which details you want to retrieve:
Output:
6) findAndReplace
This function finds an existing string and replaces it with a newly specified string. It comes with a syntax .findAndReplace("","")
. Specify the existing string data within the first double quotes, which should be searched and new string data in the second double quotes which should replace the old string data:
Output:
Note: The data you want to replace must exist in the input specified.
7) join
This function converts an array into a data string. The elements of an array are separated by a specified separator. The default separator is comma (,). It comes with a syntax .join("")
. Within the double quotes, specify the separator which will join the elements of an array with a separator in the middle of each element. You can even use a space as a separator:
Output:
Note: If a separator is not defined within the double quotes, all the elements in an array will merge together.
8) last
As the name suggests, this function returns the last element of an array:
Output:
Comments
0 comments
Please sign in to leave a comment.