Skip to content

Contains one element in array #37704

Closed as duplicate
Closed as duplicate
@adelbot

Description

@adelbot

Component(s)

No response

Is your feature request related to a problem? Please describe.

I'm looking for make a transform with conditional based on a attribut and an element is present in array

w00.target = [ "xxx", "yyy" ]

statements:
- set(xxx, "value") where yyy is an element of w00.target

Describe the solution you'd like

I'm looking for make a transform with conditional based on a attribut which is an array
w00.target = [ "xxx", "yyy" ]
I want to set a special attribut when an element is present in array

processors:
transform/target:
trace_statements:
- context: resource
statements:
- set(attributes["w00.target_yyy"], "on") where contains(attributes["w00.target"] ,"yyy")
-

Is it possible ?

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions