if it will check if response is null or undefined or response  or response  or response[""].Parsing a JSON object with jQuery and creating two drop down lists with that data. you can also check other way to your object is empty or not i also describe under.How to remove comma from string in jquery with example ? How to confige Elasticsearch in our local system. How can make an array from the values of another arrays key? amt: "10.00" email: "samgmail.com" merchantid: "sam" mobileNo: "9874563210" orderID: "123456" passkey: "1234". The above is the JSON object Im dealing with. I want to check if the merchantid key exists. I tried the below code, but its not working. How the exact type of object is being returned even though Type Erasure has reduced T to Object.Cross domain AJAX Request with Sinatra not working - sending JSON with jQuery.ajax.