- how to check a value exists in javascript dictionary
- var arr = {} ;
- if(jQuery.inArray("0", arr) != -1)
- var x = { someProperty: 0 };
- for(var p in x) {
- if(x[p] === 0) {
- //Found it!
- }
- }
- for(var p in x) {
- if(x.hasOwnProperty(p)) {
- if(x[p] === 0) {
- //Found it!
- }
- }
- }
- if(arr[0] != null)