Skip to main content
luisr0004
December 18, 2023
Question

How is this possible?

  • December 18, 2023
  • 6 replies
  • 0 views

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
    December 18, 2023

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

    luisr0004
    luisr0004Author
    December 18, 2023

    It looks like this:

    luisr0004
    luisr0004Author
    December 18, 2023

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

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