i have a local variable that i want to find by him ..
<body>
<button onclick="myFunction()">Try it</button>
<script>
var ages = [{a:"danielhason",b:"1"},{a:"aanielhason",b:"2"},{a:"banielhason",b:"3"),{a:"zanielhason",b:"4"}];
var z = "1";
function myFunction() {
document.getElementById("demo").innerHTML = (ages.find(function (age) { return age == z;})).a;
}
</script>
</body>