Yes, you can nest key-value pairs in an HTTP request payload. Here’s an example of how you might send the provided payload using Pipedream’s axios function: import { axios } from "@pipedream/platform"; export default defineComponent({ async run({ steps, $ }) { const payload = { "code": "scenario", "scenario": "weddingpro.js", "context": { "url": "https://www.weddingwire.com/emp-mail-TraceClick.php?tipo=ADMIN_SOLICITUDES_VALIDAR&durl=//www.weddingwire.com//preq.php?authsolic=72854717x6030d51c43a0282bad6e35c&utm_source=admin_solicitudes_validar&utm_medium=email&utm_campaign=admin_solicitudes_validar&utm_idTrackE=81117167", "login": "[email@gmail.com](mailto:email@gmail.com)", "password": "Password" } }; return await axios($, { method: "POST", url: "https://your-endpoint.com/path", data: payload, }); }, }); Please replace https://your-endpoint.com/path with the actual URL you’re sending the request to. The data property of the axios configuration object contains the payload you want to send.
To nest key-value pairs within the Pipedream user interface, you would typically use the object type for a prop in a Pipedream component. This allows you to define a structured object with nested key-value pairs that the user can input via the UI. Here’s an example of how you might define a prop with nested key-value pairs: export default defineComponent({ props: { nestedObject: { type: "object", label: "Nested Object", description: "An object with nested key-value pairs", // Define the structure of the nested object here properties: { key1: { type: "string", label: "Key 1", description: "The first key", }, key2: { type: "object", label: "Key 2 Object", description: "An object nested within the first object", properties: { subkey1: { type: "string", label: "Subkey 1", description: "A nested key within Key 2", }, // You can add more nested keys here }, }, // You can add more keys at the top level here }, }, }, async run({ steps, $ }) { // Access the nested object and its values in your code const { nestedObject } = this; console.log(nestedObject.key1); // Access top-level key console.log(nestedObject.key2.subkey1); // Access nested key }, }) In this example, the nestedObject prop is of type object and contains nested properties key1 and key2. The key2 is itself an object with a nested property subkey1. The user will be able to input values for these keys via the Pipedream UI when configuring the component. Remember that the structure of the nested object should be defined according to the requirements of your workflow and the data you need to collect from the user.