Check attribute is present

Check attribute is present

How to check if an attribute is present in an HTML tag ?

Suppose if i have a label tag for e.g. <label class="fieldLbl" data-company="abc"></label>

"data-company" is my custom attribute as defined in HTML 5.

So how do I check if the label under consideration has attribute called "data-company" ?