最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to Map an Array in AWS Step Functions While Keeping Parent ID? - Stack Overflow

programmeradmin0浏览0评论

Description:

I am using AWS Step Functions and need to process an input JSON that looks like this:

{
  "id": "123456",
  "bubble": [
    {
      "type": "flex",
      "altText": "001"
    },
    {
      "type": "flex",
      "altText": "002"
    }
  ]
}

My goal is to iterate over the bubble array while keeping the id field in each mapped output. The expected results should be:

1.

{
  "id": "123456",
  "bubble": {
    "type": "flex",
    "altText": "001"
  }
}
{
  "id": "123456",
  "bubble": {
    "type": "flex",
    "altText": "002"
  }
}

How can I achieve this transformation using AWS Step Functions and Map state? Any guidance on the state machine definition or JSONPath would be appreciated.


发布评论

评论列表(0)

  1. 暂无评论