Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9C252DBFF for ; Tue, 11 Sep 2012 05:13:34 +0000 (UTC) Received: (qmail 6768 invoked by uid 500); 11 Sep 2012 05:13:34 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 6604 invoked by uid 500); 11 Sep 2012 05:13:33 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 6585 invoked by uid 99); 11 Sep 2012 05:13:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Sep 2012 05:13:33 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 216.139.250.139 is neither permitted nor denied by domain of leningovi@gmail.com) Received: from [216.139.250.139] (HELO joe.nabble.com) (216.139.250.139) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Sep 2012 05:13:28 +0000 Received: from jim.nabble.com ([192.168.236.80]) by joe.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1TBImZ-00033f-QC for dev@couchdb.apache.org; Mon, 10 Sep 2012 22:13:07 -0700 Date: Mon, 10 Sep 2012 22:13:07 -0700 (PDT) From: lenin To: dev@couchdb.apache.org Message-ID: <1347340387799-7580890.post@n2.nabble.com> Subject: How to fetch particular data from document in couchdb using jquery MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org How to get particular data from document Example in sql SELECT * FROM TABLE WHERE ID='101' i have created map function in couchDB(Futon) : function(doc,val) { if(doc.amount=='1') { // here instead of '1' i can use variable val(2nd argument of the fun) emit(doc.amount, doc.name); } } my jquery code is : * $(document).ready(function() { var db = $.couch.db(window.location.pathname.split("/")[1]); $("#dataview").empty(); db.view("myDesign/myView", { success: function(data){ data.rows.map(function(row) { / //my printing logic goes here // here i can able to get all the data irrespectively. // which condition i need add to get specified record. // how to use above function using jquery/ }); }, error: function(req, textStatus, errorThrown){ alert('Error '+ textStatus);} }); }); * Explain the code to write using Jquery. Here am using jquery.couch.js, jquery.js Thanks in advance..... Regards G.Lenin -- View this message in context: http://couchdb-development.1959287.n2.nabble.com/How-to-fetch-particular-data-from-document-in-couchdb-using-jquery-tp7580890.html Sent from the CouchDB Development mailing list archive at Nabble.com.