The length function is not working correctly without using flatten

Certified Associate Developer
Here, the integrationResponse.result.body is an array of dictionaries. However, the length function returns 1 if not using flatten. Not sure why this is happening. Please share comments/reasons if any.

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to Mike Schmitt

    Thank you for your input. On the formatted result it say "list of String " but when i open the value it shows Anytype ,

    I type cast to list string and it worked. thanks.

    a!localVariables(


    local!orderIds: rule!ABC_getOrders(id: "Abc"), //integration call returns List of strings

    local!totalCount: length(cast(typeof({"asdjahsd","asdasfasd"}),local!orderIds)),

    local!totalCount)

Children