This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Yes, you need to loop through the cookie array. If you somehow knew the index of the cookie in the array you could go right to it. However, the cookies are not in any particular order. So you need to loop through each one to get the cookie name and see if it is the one you are interested in.