Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script class="jsbin" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<meta charset=utf-8 />
<title>Jeet Chauhan</title>
</head>
<body>
    <p id="debug">Z</p>
</body>
</html>
 
var obj = {
 6:{"name":"Mary", "status":true},
 2:{"name":"Mike", "status":true},
 1:{"name":"John", "status":false},
 4:{"name":"Mark", "status":true},
 5:{"name":"Jane", "status":false}
};
var count = 0;
for (var prop in obj) {
  if(obj[prop]["status"] == true){
   count += 1; 
  }
     
}
$("#debug").text("Output: "+count);
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers