# ProvideItems

The array that the Map state will iterate over.

Obtainable from: ProvideItems.jsonArray, ProvideItems.jsonata

- Source: [`aws-stepfunctions/lib/states/map-base.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-stepfunctions/lib/states/map-base.ts#L63)
- Type last changed: v2.178.0 · 6 Feb 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_stepfunctions as stepfunctions } from 'aws-cdk-lib';

declare const array: any;
const provideItems = stepfunctions.ProvideItems.jsonArray([array]);
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_stepfunctions as stepfunctions

# array: Any

provide_items = stepfunctions.ProvideItems.json_array([array])
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.stepfunctions.*;

Object array;

ProvideItems provideItems = ProvideItems.jsonArray(List.of(array));
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.StepFunctions;

var array;

var provideItems = ProvideItems.JsonArray(new [] { array });
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var array interface{}

provideItems := awscdk.Aws_stepfunctions.ProvideItems_JsonArray([]interface{}{
	array,
})
```

## Initializer

TypeScript:

```ts
new ProvideItems()
```

Python:

```python
ProvideItems()
```

Java:

```java
new ProvideItems()
```

C# / .NET:

```csharp
new ProvideItems()
```

Golang:

```go
NewProvideItems()
```

## Properties

- `items`: any — The array that the Map state will iterate over.

## Methods

- `jsonArray(array: any[]): ProvideItems // chainable` (static) — Use a JSON array as Map state items.

  Example value: `[1, "{% $two %}", 3]`

- `jsonata(jsonataExpression: string): ProvideItems // chainable` (static) — Use a JSONata expression as Map state items.

  Example value: `{% $states.input.items %}`
