1// You can turn the values of an Object into an array.
2// Then test that a value is present:
3
4// This assumes, that the Object is not nested
5// and the value is an exact match:
6
7var obj = { a: 'test1', b: 'test2' };
8
9// Note that an array can only have positive index's; so
10// checking for a negative index is a super valid way for getting a
11// boolean value as a result for the check.
12if (Object.values(obj).indexOf('test1') > -1) {
13 console.log('Value exists!');
14}
15