I'm building a solution where I will need to add attributes such as color, type on my products. The products will be able to have more than one color.
So my question is, should I structure my data attributes as arrays in firebase, or objects, or is there an other way?
I would like to filter my products with .eQualTo (or if there is a better way) https://firebase.google.com/docs/reference/js/firebase.database.Query#equalTo
Example 1)
{
name: "My red n' white product",
color: ["white", "red"]
}
Example 2)
{
name: "My red n' white product",
color: {red: true, white: true}
},
{
name: "My blue product",
color: {blue : true}
}
Example 3) ?