Seems that you forget to indicate if which one is underlined so I'll just answer based on the sentences you have given.
Based on the sentences, I can say that the noun clause that functions as a direct object would be the last sentence. You see, the noun clause here is "whatever you need for the beach", and this is the direct object receiving the action from the verb "pack". Hope this helps.