0

I have 2826 objects. In that objects for example I want to take values like "name" then check that value is presented or not in that object. If presented means I want to take count of value("name") using JavaScript with out using for loop or each function.

In angular I am using:

var getunique_count = $filter('filter')(scope.payloadRowCollection,key);

But with JavaScript I don't know. So please any one help me to solve this issue or give any example.

Opal
  • 81,889
  • 28
  • 189
  • 210
phpdev
  • 77
  • 1
  • 7

1 Answers1

0

If you want to do a deep search (check recursively in child objects of the current object) of the key "name" in a collection of objects you should use recursion. But still you will have to use loops.

Understanding Recursion

Dulev
  • 93
  • 5