E9.2 Nested Arrays Showing Null in JSON Inputs

BookClub

Member
Hello, I am currently on 9.2.4.6 and I am facing this issue that I can't find much documentation on. For example with this JSON:
JSON:
{
  "box": "5",
  "crate": [
    {
      "crateId": "1",
      "crateSize": "A",
      "items": [
        {
          "itemNum": "12",
          "quantity": "2"
        },
        {
          "itemNum": "15",
          "quantity": "1"
        }
      ]
    },
    {
      "crateId": "2",
      "crateSize": "B",
      "items": [
        {
          "itemNum": "3",
          "quantity": "15"
        }
      ]
    }
  ]
}

This Orchestration will be ran via REST for each box. Each box can contain multiple crates. Each create can contain multiple items. I want to to iterate over the crates in my Orchestration, therefor in my inputs I set them like this:
1642191639234.png
Orchestrator does not let you have an Array inside of an Array so I make items an Object here.
The issue I am facing now is that I can't iterate over the Object. I have tried parsing the Object with Groovy and I am only ever getting it back as a null value whenever I pass it into anything (whether it be another Orchestration or Custom code). Has anyone dealt with anything similar to this that would have suggestions? The end goal here is to do an action (for now sending an email with) for each item in the crate (therefor 3 emails with this particular JSON). I can't get anything to work because the items Object keeps coming back null. I tried a workaround by iterating through the crates and passing each crate into a secondary Orchestration that would iterate through the items of each crate but the input seems to always go in null or blank.
Let me know if I can provide any further information to make this problem make sense! Thank you and have a great day!
 
Top