Skip to content

Example on arrays #774

@AndersBennedsgaard

Description

@AndersBennedsgaard

Is your feature request related to a problem? Please describe.

I'm trying to create a node which have an array of key-value inputs, which is nicely formatted in the node frontend, but I can't figure out how to do this. Is this possible in extensions?

Describe the solution you'd like

I would like an example in https://github.com/Cognigy/Extensions/blob/master/docs/example/src/nodes/fullExample.ts or similar, which shows how you can create arrays with arbitrary fields in it. Similar to how headers are handled with the native HTTP node:

Image

Here, each entry in the array (or, I guess an underlying key-value JSON object?) have a key which is a hardcoded string, and a value which is CognigyText. How is this possible?

Describe alternatives you've considered

No real alternative other than an ugly JSON field.

Additional context

For context, I have to create multiple nodes where this is needed. One example is a node which can accept a list of arbitrary headers (similar to the native HTTP node)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions