JS code that search through every property in a nested object
Too much messing about in hyper space.

You have way too much messing about. Object.assign is slow and more so when you don't need it.

RegExp is fast

If you are going to search strings use a RegExp it is far far quicker. And if not don't convert the same value to lower (or upper) case every time you need to check it. Once is all you need to do.

I can not quite workout where you are getting element.key from. 

Set and Map for lookups

Rather than search manually over an array of keys you can use a Set that will provide fast hash table lookup

// at the very start of the search create an empty set
var foundKeys = new Set(); 

...

// then rather than loop over iwoList check if the set already has the key
if (!foundKeys.has(object.key)) { 
    foundKeys.add(object.key);  // if not add the new one
    this.iwoList.push(object);
}
// saving a mass of cycles.


Look for the quick answer

It would be better to check the foundKeys set right at the start before you search the object. No point searching for a match only to dump the result because you have that key. Make it the first thing to check before you search the object, first thing inside the loop would be the best way to avoid many cycles.    

Bloat also eats cycles

Its all a little hanging out and bloated at the start.


 let object = Object.assign({}, element);  // object is copied from element
 object['key'] = element.key;  // then you copy key, but key will be in object from the line above
 let keys = Object.keys(object)   // then create a keys array and a iterator index
 for (let i = 0; i &lt; keys.length; i++) {
   let prop = keys[i]  // another variable 
   let item = object[prop]  // and another



Why not just the one line, same as the 6 above just much quicker...

for(const item of Object.values(element)){


The rewrite

Without more info, I read your code to find the first instance of the search term and add the object that it was part of from the objectArray to the result.

Checking arrays, and objects, and matching any strings or numbers found, case insensitive. 

As a standalone function the following returns an array of objects that contain a property that matches keyword. I would assume that the objects come from a JSON so have ignored any cyclic references problems (which can be checked with a Set if needed)

The string matching is via a regExp

The whole thing is just an extended Array.filter call

function search(array, keyword) {
  const regExp = new RegExp(keyword,"gi");
  const check = obj =&gt; {
    if (obj !== null &amp;&amp; typeof obj === "object") { return Object.values(obj).some(check) }
    if (Array.isArray(obj)) { return obj.some(check) }
    return (typeof obj === "string" || typeof obj === "number") &amp;&amp; regExp.test(obj);
  }
  return array.filter(check);
}