Files
noodl-docs/nodes/data/array/static-array/README.md
Eric Tuvesson 656e5fc8d2 chore: Upgrade Docusaurus from v2 to v3 (#52)
* chore: Upgrade Docusaurus from v2 to v3

* chore: Update "Test build" GH workflow

* fix: build

All markdown is processed as MDX

* fix: Broken links
2024-01-12 16:53:22 +01:00

2.4 KiB

hide_title, hide_table_of_contents, title
hide_title hide_table_of_contents title
true true Static Array node

{/##head##/}

Static Array

Store static data to populate an Array with items. The Static Array node is great for providing static local data for lists etc. You can use it e.g. as an input to a For Each node.

You can provide the data in either CSV format or, JSON format. The items output is of Noodl.Array format. The content of the array is reset whenever the application is refreshed.

{/##head##/}

Inputs

Data Description
Type Choose what format the data will be in.

CSV: Comma-separated values
JSON: JavaScript Object Notation

CSV

The first row defines the name of all properties. Subsequent rows defines the data values. Example:

lamp,topic
Kitchen Lamp,/lamps/1
Office Lamp,/lamps/2
Office Lamp 2,/lamps/4

JSON

Define the name of the properties, and the data, using a JSON array. Example:

[
    {
        "lamp": "Kitchen Lamp",
        "topic": "/lamps/1"
    },
    {
        "lamp": "Office Lamp",
        "topic": "/lamps/2"
    },
    {
        "lamp": "Office Lamp 2",
        "topic": "/lamps/4"
    }
]

Outputs

Data Description
Items {/##output:items##/}A Noodl.Array object that can be connected to e.g. an Array, JavaScript or Repeater.{/##output##/}