jquery if key exists in object

Solutions on MaxInterview for jquery if key exists in object by the best coders in the world

showing results for - "jquery if key exists in object"
Louanne
22 Mar 2016
1let myDict = {"a": 53, "b": 42}
2
3if "a" in myDict {} // True
4if "c" in myDict {} // False
Ciara
08 Apr 2018
1Use the in operator:
2
3testArray = 'key1' in obj;
4Sidenote: What you got there, is actually no jQuery object, but just a plain JavaScript Object