Formula accessing an element of an object array in a cell

Posted by: ichioka.yuji on 26 February 2026, 4:34 am EST

    • Post Options:
    • Link

    Posted 26 February 2026, 4:34 am EST

    When a cell contains an object value, we can use formulas with the dot operator to access the properties of that object (for example: =G10.User.Address.Home).

    According to the documentation:

    https://developer.mescius.com/spreadjs/docs/formulareference/FormulaFunctions/other-functions/property-function#dot-operator

    If the cell contains an object value that includes an array, can we access an array element by specifying its index in brackets? For example: =G10.User.Addresses[2].Home?

  • Posted 26 February 2026, 6:13 am EST

    Hi,

    Thank you for raising this! It seems like bracket index notation (e.g. =G10.User.Addresses[2].Home) is currently not supported by the dot operator, which only allows named property traversal. There is also no built-in formula function available to index into a JavaScript array stored within an object cell value.

    We have escalated this to our development team to investigate whether bracket index notation could be supported natively as an extension of the dot operator in a future release, and to explore any alternative approaches. The internal track id is “SJS-33915”. We will keep you updated as soon as we have more information.

    Best regards,

    Priyam

  • Posted 26 February 2026, 6:42 am EST

    Hi,

    The dev team has informed us that square brackets are special characters in formula syntax and have specific meanings. Therefore, the formula syntax cannot follow JavaScript object access syntax.

    As a workaround, you can modify the formula to:

    =G10.User.Addresses.2.Home

    Since an array index is treated as a property of the array, this approach should work.

    Regards,

    Priyam

  • Posted 26 February 2026, 9:48 pm EST

    That works well. Thank you!

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels