Get a string item from a map
Function: Get a string item from a map
This action allows you to retrieve a specific piece of text from a collection of information. Imagine you have a list of items, where each item has a unique label (called a "key") and a corresponding value. This function helps you find the value associated with a particular label.
Input
- Map: A collection of key-value pairs, similar to a dictionary or a list where each entry has a unique label and its associated data.
- Key: The specific label (a piece of text) you want to use to find its corresponding value within the Map. This input is required.
Output
- Result: The piece of text that was found in the Map for the provided Key. If the Key is not found in the Map, this output will be empty or not set.
Execution Flow
Real-Life Examples
Here are some examples of how you can use the "Get a string item from a map" action:
-
Retrieving a User's Email from Profile Data
- Inputs:
- Map:
\{"Name": "Alice Smith", "Email": "[email protected]", "Role": "User"\} - Key: "Email"
- Map:
- Result: The output "Result" will be "[email protected]".
- Inputs:
-
Getting a Product's Color from its Specifications
- Inputs:
- Map:
\{"Product ID": "P101", "Name": "Wireless Mouse", "Color": "Black", "Price": "25.99"\} - Key: "Color"
- Map:
- Result: The output "Result" will be "Black".
- Inputs:
-
Checking an Application's Language Setting
- Inputs:
- Map:
\{"Theme": "Light", "Language": "English", "Notifications": "On"\} - Key: "Language"
- Map:
- Result: The output "Result" will be "English".
- Inputs:
-
Handling a Missing Configuration Setting
- Inputs:
- Map:
\{"Server": "Production", "Port": "8080"\} - Key: "Database"
- Map:
- Result: The output "Result" will be empty or not set, as "Database" is not present in the provided Map.
- Inputs: