Hi,<div>I&#39;m not really confortable with the double dot, but I have no other idea for the moment :) (maybe &#39;-&gt;&#39; ?).</div><div>And should your pseudo code not be written this way : </div><span style="font-family:arial,sans-serif;font-size:13px"><div>
<span style="font-family:arial,sans-serif;font-size:13px"><br></span></div>var filtered = filter({</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">        &quot;x.sites.&#39;<a href="http://google.com">google.com</a>&#39;.type&quot;: {</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">                data:  &quot;search engine&quot;</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">        }</span><br style="font-family:arial,sans-serif;font-size:13px">
<div><span style="font-family:arial,sans-serif;font-size:13px">});</span> </div><div><br></div><div>?</div><div>Seb</div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 13, 2012 at 5:22 PM, Kris Borchers <span dir="ltr">&lt;<a href="mailto:kris@redhat.com" target="_blank">kris@redhat.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey all, I am trying to enhance the filter method to be able to filter objects based on values nested inside other objects inside that main object. My first thought was just to use dot notation to specify the field we are filtering on but that runs into issues if the key actually has a &quot;.&quot; in it like this:<br>

<br>
var x = {<br>
        sites: {<br>
                &quot;<a href="http://google.com" target="_blank">google.com</a>&quot;: {<br>
                        type: &quot;search engine&quot;<br>
                }<br>
        }<br>
}<br>
<br>
Trying to traverse that object via:<br>
<br>
// pseudocode<br>
var filtered = filter({<br>
        &quot;x.sites.google.com.type&quot;: {<br>
                data:  &quot;search engine&quot;<br>
        }<br>
});<br>
<br>
would fail. I&#39;m wondering if we should just define our own separator for the path through the object. We could use &quot;..&quot; (double-dot) which I think should work so something like:<br>
<br>
// pseudocode<br>
var filtered = filter({<br>
        &quot;x..sites..google.com..type&quot;: {<br>
                data:  &quot;search engine&quot;<br>
        }<br>
});<br>
<br>
Then I can separate on &quot;..&quot; and parse that way. Thoughts?<br>
_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
</blockquote></div><br></div>