jquery check if dictionary has key

Solutions on MaxInterview for jquery check if dictionary has key by the best coders in the world

showing results for - "jquery check if dictionary has key"
Madeleine
22 Mar 2016
1let myDict = {"a": 53, "b": 42}
2
3if "a" in myDict {} // True
4if "c" in myDict {} // False
David
18 Jan 2017
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