Can this iterating javascript code be optimized?
You should cache all methods calls - JS is interpreting language and
there is no optimizers to help you, therefore, each time you call
method, get element from array etc, you are actually asking JS
engine to DO this for you.
Concluding that someObjArry is an array, should avoid using loops with "in" statements - use standard loops with indexes instead. "in" statement walks through all object's properties, not collection's elements, so it's just future maintenance "watch-out".
Property "displayName" of object "someObj" seems like of a string type - try using strong type comparisons if possible (not an optimization, just a good practice)
Cache as much as you can




var someArray = MainObj.aaa.bbb[MainObj.someGetIdMethod()].someObjArry, 
    arrayElement;

for(var i=0, $length = someArray.length; i&lt; $length; i++){
    arrayElement = someArray[i].someObj;

    if (arrayElement.displayName === 'some value'){
        console.log(arrayElement.someId);
    }
}