Get object keys
Function: Get object keys
This action helps you extract all the attribute names (or "keys") from a structured piece of information, often referred to as an "object." Imagine you have a customer record with fields like "Name," "Email," and "Phone Number." This action would give you a list containing "Name," "Email," and "Phone Number." It's useful when you need to know what information is available within a data structure without knowing the exact fields beforehand.
Input
- Object: The structured piece of information (like a record or a collection of data) from which you want to retrieve the attribute names.
Output
- Result: A new variable that will hold a list of all the attribute names (text values) found in the input "Object."
Execution Flow
Real-Life Examples
Example 1: Inspecting a Customer Record
- Scenario: You have a customer record and want to dynamically list all the available fields for display or further processing.
- Inputs:
- Object:
Customer_Record(e.g.,\{"FirstName": "Alice", "LastName": "Smith", "Email": "[email protected]", "CustomerID": "12345"\})
- Object:
- Result: A new variable named
Customer_Fieldswill be created, containing the list:["FirstName", "LastName", "Email", "CustomerID"].
Example 2: Analyzing Product Data
- Scenario: Your application receives product data from an external system, and you need to identify all the data points (attributes) included in each product entry.
- Inputs:
- Object:
Product_Details(e.g.,\{"ProductName": "Laptop Pro", "Price": 1200.00, "SKU": "LP-001", "Weight_kg": 2.5, "InStock": true\})
- Object:
- Result: A new variable named
Product_Attributeswill be created, containing the list:["ProductName", "Price", "SKU", "Weight_kg", "InStock"].
Example 3: Processing Form Submissions
- Scenario: A user submits a form, and you want to get a list of all the fields they filled out, regardless of the specific form.
- Inputs:
- Object:
Form_Submission_Data(e.g.,\{"FullName": "John Doe", "Address": "123 Main St", "City": "Anytown", "ZipCode": "12345"\})
- Object:
- Result: A new variable named
Submitted_Fieldswill be created, containing the list:["FullName", "Address", "City", "ZipCode"].