Applying variable if hidden input value is xx

Applying variable if hidden input value is xx

Hi all, Basically I have several hidden inputs, each with different values. I need to do something like:
if ('input:hidden').val('===1') {
      var foo = true;
})

I know this is not right. I need to get the hidden input's name in there somehow. Help is always appreciated!
Thanks,
Kane