I have an array of elements of the same class, how can I search indexOf with only one element from the class

```
class Dhash {
  constructor(Dlable, tophash) {
    this.Dlable = Dlable;
    this.tophash = tophash;
  }
}
let listohashs = [];
listohashs[0] = new Dhash(0x001003, 0xfffffffffffffffffffffffffffffffffa);
listohashs[1] = new Dhash(0x011003, 0xfffffffffffffffffffffffffffffffffb);
listohashs[2] = new Dhash(0x021003, 0xfffffffffffffffffffffffffffffffffc);

console.log(listohashs.indexOf(0x001003));  // <-- here be the problem

```

I need it to return 0 for this example as it matches `listohashs[0].dlable` that way i can get the corosponding `tophash` value

I have tried:
 `console.log(listohashs.indexOf(0x001003));` and putting `.dlable` anywhere in there that I could think of.

can I search with a wild card in one of the element places?
i.e. where \* will match anything

```
searchohash = new Dhash(0x001003, *);
console.log(listohashs.indexOf(searchohash));

```

Is json what i should be using? im new to js and just started using json a few days ago