Ege Ersoz
09/19/2024, 10:21 PMcolor
and is of type object[]
where the two object fields are color_name
and hex
. Different documents have different colors. I'm trying to build a dropdown field that will contain all possible colors in this field. Is there a way to aggregate/combine the color_name
values across the collection? For example, if document 1 has:
[
{"color_name": "abc", "hex": "#232435"},
{"color_name": "cde", "hex": "#ade344"}
]
And document 2 has:
[
{"color_name": "fgh", "hex": "#555555"},
{"color_name": "xyz", "hex": "#666666"}
]
I'd like to get a list that is a combination of these (ideally unique) so that I can show the possible colors in the dropdown.