Skip to main content
luisr0004
Known Participant
Dec 18, 2023 2:42 PM UTC
Question

How is this possible?

Let me share with you the results of this code snippet

a!map(
    length: length(local!taller.resultado.contractSetting.annuitySettings.paymentMethods),
    pm: local!taller.resultado.contractSetting.annuitySettings.paymentMethods,
    isnull: a!isNullOrEmpty(local!taller.resultado.contractSetting.annuitySettings.paymentMethods)
  )

I'm wondering why length of a null array is equal to 1.

I appreciate any explanation to this.

Regards

    6 replies

    stefanhelzle0001
    Brainy
    Dec 18, 2023 2:52 PM UTC

    Impossible to say without knowing exactly what this data structure looks like.

    luisr0004
    luisr0004Author
    Known Participant
    Dec 18, 2023 2:55 PM UTC

    It looks like this:

    luisr0004
    luisr0004Author
    Known Participant
    Dec 18, 2023 2:59 PM UTC

    Here you have direct output from the service which this data come from, in json format

    "annuitySettings":{"paymentMethodTypeCode":"","paymentMethodTypeDesc":"","paymentMethods":[]},