Skip to content

Feature request: Support depth levels in feature flag keys #4690

@adriantomas

Description

@adriantomas

Use case

Currently the key of the conditions of the feature flags only support that the values sent in the context are first level.

It would be very interesting to be able to support depth levels, like with a dot attribute access or with a string list of dictionary keys, so that for example a feature flag can be defined based on the raw content of the event without having to transform it or extract something from it.

Solution/User Experience

Context:

{
  "foo": {
    "bar": "premium"
  }
}

Schema:

{
    "premium_feature": {
        "default": false,
        "rules": {
            "customer tier equals premium": {
                "when_match": true,
                "conditions": [
                    {
                        "action": "EQUALS",
                        "key": ["foo", "bar"],
                        "value": "premium"
                    }
                ]
            }
        }
    }
}

Alternative solutions

No response

Acknowledgment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Closed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions