Parse Data Dictionary

This function block is designed to parse and retrieve data from a given input data dictionary. It allows users to select a specific key from the dictionary to extract its corresponding value.

📥 Inputs

Input Dictionary (String) A string representation of a data dictionary (JSON format) from which values will be extracted.

📤 Outputs

Output Data This output provides the value associated with the selected key from the input dictionary.

🕹️ Controls

Select key from input data dict A dropdown menu that populates the keys from the provided data dictionary. Users can choose the desired key to extract its value.

🎨 Features

Dynamic Key Selection Automatically updates the available keys in the dropdown menu based on the provided input dictionary.

Value Retrieval Allows the extraction of specific values based on the selected key.

📝 Usage Instructions

  1. Input Data: Provide a string representation of a dictionary (in JSON format) to the Input Dictionary (String) input.

  2. Select Key: Choose the desired key from the dropdown menu that appears. This menu will populate automatically with keys from the provided dictionary.

  3. Evaluate: Run the block to retrieve the value associated with the selected key. The value will be sent to the output.

📊 Evaluation

Upon evaluation, this function block parses the input string as a JSON object, allowing users to dynamically select keys and retrieve corresponding values.

💡 Tips and Tricks

Correct Input Format

Ensure the input string is in valid JSON format. For example, it should look like: {"name": "product", "id": 345}. Any incorrect format will result in an error.

Dynamic Updates

If you change the input dictionary after selecting a key, the dropdown menu will automatically refresh to show only the available keys from the new dictionary.

Ensure to select the key after the dictionary has been updated.

Using with Other Blocks

This block can be very useful in combination with Data to JSON, Data Read Local or Data Read Global function blocks where JSON strings are often used.

You can easily extract specific elements from complex JSON data.

🛠️ Troubleshooting

Invalid JSON Format

If the input string doesn't follow the JSON format correctly, the block may not work. Double-check the input and ensure it uses double quotes for keys and string values.

No Keys Displayed

If the dropdown menu does not show any keys after providing input, verify that your input string is correctly converted into a dictionary. Use JSON validators online to help ensure correct format.

Last updated