Skip to content

Is there a built-in way to use the ["key"] indexer directly on Dictionary<string, object> in {{ ... }} expressions? #401

@KanonRim

Description

@KanonRim

Question / Feature Request

Question

Is there a built-in way to use the ["key"] indexer directly on Dictionary<string, object> inside {{ ... }} expressions in ClosedXML.Report templates?

If not, are there recommended best practices for working with nested dictionaries (e.g. Dictionary<string, object> containing other dictionaries) in templates?


Sample data structure

var items = new List<Dictionary<string, object>>
{
    new Dictionary<string, object>
    {
        ["id"] = 1,
        ["nodes"] = new Dictionary<string, object>
        {
            ["dynamic_node"] = new Dictionary<string, object>
            {
                ["availability"] = "Available"
            }
        }
    }
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions