Question in viewings

2014-06-16 Thread Σπύρος Σβορώνος
Hi everyone, I am quite new and i have a relatively simple question for which i do not seem to find the answer. When i try to view a field that has a name which is a number (e.g. A field named 123), if i write something like: function(doc) { If (doc.123) { list of args} } I get an error saying

Re: Question in viewings

2014-06-16 Thread Mike Marino
Am 16.06.2014 um 12:29 schrieb Pieter van der Eems p.van.der.e...@interactiveblueprints.nl: The problem you encounter here has to do with javascript. Javascript does not allow you to do doc.123. It will allow you to access the 123 of doc by using the alternate syntax: +1 I'll only add it

Re: Question in viewings

2014-06-16 Thread Σπύρος Σβορώνος
Thanks for yous replies guys! I ll have a more in depth look into javascript! Cheers

Re: Question in viewings

2014-06-16 Thread Jens Alfke
On Jun 16, 2014, at 3:29 AM, Pieter van der Eems p.van.der.e...@interactiveblueprints.nl wrote: doc[123]; That should be doc[123]; since the key is a string, not a number. —Jens

Re: Question in viewings

2014-06-16 Thread Mark Hahn
Actually a number should work since it will be coerced into a string. At least this happens in Chrome. I know using auto-coercion is uncool but I thought I'd just throw that out there. On Mon, Jun 16, 2014 at 12:40 PM, Jens Alfke j...@couchbase.com wrote: On Jun 16, 2014, at 3:29 AM, Pieter