1001fx - NoCode functions icon

1001fx - NoCode functions

1001fx is a set of functions for any automation platform. Our functions are simple, very well tested, scalable and offer features that most automation platforms do not offer.

Actions74

data → Get Keys and Values from JSON Object

AI-generated

Overview

This node, part of the "1001fx - NoCode functions" suite, provides a utility to extract all keys and their corresponding values from a given JSON object. The "Get Keys and Values from JSON Object" operation is useful in scenarios where you need to flatten or inspect the structure of complex JSON data within your automation workflows. For example, you might use this node to dynamically generate lists of fields for further processing, reporting, or mapping tasks.

Practical examples:

  • Extracting all key-value pairs from an API response for logging or auditing.
  • Preparing data for transformation or export by listing all available fields.
  • Debugging or visualizing the structure of incoming JSON payloads.

Properties

Name Meaning
JSON Input JSON object to process

Output

The output will be a JSON object containing the extracted keys and their corresponding values from the input JSON object. The exact structure depends on the input, but typically it will be a flat representation of the original object's keys and values.

Example output:

{
  "key1": "value1",
  "key2": 123,
  "key3": true
}

If the input JSON contains nested objects, the output may represent them as nested structures or flattened, depending on the implementation details of the backend API.

Dependencies

  • External Service: Requires access to the 1001fx API.
  • API Key: You must configure the 1001fxApi credential in n8n.
  • Environment: Internet connectivity is required for API requests.

Troubleshooting

Common issues:

  • Invalid JSON Input: If the provided JSON is malformed, the node may return an error or unexpected results. Ensure your input is valid JSON.
  • Authentication Errors: Missing or incorrect API credentials will result in authentication failures. Double-check your 1001fxApi configuration.
  • API Limitations: Large or deeply nested JSON objects may hit API limits or timeouts.

Error messages:

  • "error": "Unexpected token ..." – Indicates invalid JSON input. Check your JSON syntax.
  • "error": "401 Unauthorized" – Your API key is missing or incorrect. Update your credentials.
  • "error": "Request failed with status code 4xx/5xx" – General API error; check the API status and your request parameters.

Links and References

Discussion