I have a collection where one of the schema fields...
# community-help
e
I have a collection where one of the schema fields is named
color
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:
Copy code
[
  {"color_name": "abc", "hex": "#232435"},
  {"color_name": "cde", "hex": "#ade344"}
]
And document 2 has:
Copy code
[
  {"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.