jquery check if dictionary has key
let myDict = {"a": 53, "b": 42}
if "a" in myDict {} // True
if "c" in myDict {} // False
jquery check if dictionary has key
let myDict = {"a": 53, "b": 42}
if "a" in myDict {} // True
if "c" in myDict {} // False
jquery if key exists in object
Use the in operator:
testArray = 'key1' in obj;
Sidenote: What you got there, is actually no jQuery object, but just a plain JavaScript Object
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us