couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Klaus Mueller...@klml.de>
Subject couchapp: dynamic key
Date Fri, 15 Oct 2010 00:23:44 GMT
Hi folks,

with couchapp I can set the dynamic "value" lets say 'something') to a
key (here 'status')

      doc.status = "value" ;

with
      app.db.saveDoc(doc, {
        success : function() { }
      });
the result is
      "status" : "something"


but is it possible to set a dynamic key (e.g. var id = li.attr("data-id"); )

      doc.status = "value" ;  // status should not set as "status" but
"1234"

the result should be
      "1234" : "something"

?

thx & cheers
klml

-- 
Klaus Mueller
Heßstraße 90
80797 München

+49 89 18 98 58 21
+49 178 54 38 400
klml.de


Mime
View raw message