Instead of searching an entire string for an underscore, it should be faster to simply compare opk[0] to '_', right? opk is guaranteed to be a string, since it comes from an object in a for-in-loop.