- Net-Raft.com

Welcome aboard! We are happy you are here and wish you good net-raft!

Just a Web Code Solution

check if key already exists using jquery


Show ResultJQUERY


<!DOCTYPE html>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
$(document).ready(function () {

var obj = {
"key1": "test1",
"key2": "test2",
"key3": "test3"

if (obj.hasOwnProperty("key1")) {

$("div").text("your key already exists!");


else {

$("div").text("your key does not exist!");





By     Created   
The power of the user (%)

The most helpful solutions

get value of div using jqueryget value of div using jquery

Click to see more ...

  141     8