spennybuns
spennybuns

Reputation: 247

How to convert string to list in JSONPath notation?

stepfunctionscreenshot

The JSON in line 5 in the Parameters section of the screenshot uses JSONPath notation in AWS Step Functions. The key is "Values.$" and the value is a JSONPath that selects a string "$". However, I need to pass in a LIST not a STRING. The value that $ selects is a string.

If I put brackets around, it no longer recognizes that I'm using JSONPath notation and simply passes in the dollar sign character instead of gets the value from inputs.

How can I use JSONPath notation and pass in a string as a list?

Upvotes: 1

Views: 1637

Answers (1)

deric4
deric4

Reputation: 1326

Should be able to use the States.Array Intrinsic Function since Parameters is a Payload Template

{
  "Filters": [{
    "Name": "replication-task-arn",
    "Values.$": "States.Array($)"
  }],
  "MaxRecords": 20,
  "WithoutSettings": true
}

Upvotes: 2

Related Questions