couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cunningham, Carl" <>
Subject Accessing individual records returned by a view
Date Sun, 01 Nov 2009 08:31:58 GMT
Hi folks,

I'm experimenting with using CouchDB as a datastore for various
MS-Office macros, and everything has been just wonderful until I started
to return result sets using views. It appears that the various JSON
implememtations for VBA (and there aren't many out there for pure VBA
code) don't seem to be able to deal with nested structures. Here's an

A view returns the following JSON string:

"subject":"test subject","senton":"2009-7-09 22:03:43"}},
"subject":"test subject2","senton":"2009-4-21 10:18:26"}}]}

I then instantiate a jsonlib object, which contains the methods needed
to parse the string:
"Dim lib As New jsonlib"

Then I define a new object, which will eventually contain a
collection/dictionary object populated with the keys/values of the JSON
"Dim json As Object"

Then the JSON string is parsed and shoved into the collection/dictionary
"Set json = lib.parse(mystring)"

The problem here is that I can then only access the "total_rows" and the
"offset" keys/values; the "rows" value is blank.

I know that this is actually not a CouchDB question it's a VBA/JSON
question. I would very much appreciate any assistance.

Carl K. Cunningham

View raw message