jquery and json
jquery and json
i use Nosql database
i had a table call aabc
i had a field name rows
the values on the field is array
but the number on the values 0,1,2,3 .... the database program who is give it not on the same data
i want make login code by jquery really need a loop i'll have two textbox one for username like txtuser and other for txtpsw
and like the last pic , test1 work with password who it belongs to him user:test1, password:1111 as up
if he login the <div> will appear.
i want to get the value of rows one by one on loop code
<script>
var db = $.couch.db("aabc");
var id = "iams";
db.openDoc(id, {
success:function (result) {
$("#revision").val(result.rows[1]);
},
error:function (a, b, c) {
alert("Error: " + c);
console.log("Error on openDoc:", a, b, c);
}
});
</script>
aabc that is the name of the document cus on nosql there r no table its document
id is field something like key
$("#revision").val(result._rows[1]); didnt back any value
i need the syntax to back the value on that array
this syntax $("#revision").val(result._age); work good with field with one value like age = 40
note
that script without loop