Filtering a JavaScript Object
I have a Java script that looks something like this in the browser console
https://www.dropbox.com/s/53spm6lf7o6oa8z/Selecci%C3%B3n_2015-07-10-001.png
What I would like to do is return a filtered object based on the content of the "class" property ... I have looked into JQuery.grep () or .filter () but they don't quite work as this object is not an array and I was unable to convert it into one ...
I will appreciate the pointer in the right direction
+3
source to share
3 answers
If you are looking for a tool / framework to do this easily, it looks like you are after lodash
It supports _.filter as well as other handy features that will probably help you with processing. If you can be more specific about your desired output, we can probably help you with a specific answer.
0
source to share