Firebase structuring and filtering multiple attributes (values) on key
<p>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.</p>

<p>So my question is, should I structure my data attributes as arrays in firebase, or objects, or is there an other way?</p>

<p>I would like to filter my products with .eQualTo (or if there is a better way)
<a href="https://firebase.google.com/docs/reference/js/firebase.database.Query#equalTo" rel="nofollow">https://firebase.google.com/docs/reference/js/firebase.database.Query#equalTo</a></p>

<p>Example 1)</p>

<pre><code>{
name: "My red n' white product",
color: ["white", "red"]
}
</code></pre>

<p>Example 2)</p>

<pre><code>{
name: "My red n' white product",
color: {red: true, white: true}
},
{
name: "My blue product",
color: {blue : true}
}
</code></pre>

<p>Example 3) ?</p>