I think you have to do:

 

JSON.parse(v.values[0].data)

 

Atleast I want to say I had to when using the riak-js node library.

 

-Chad

 

From: riak-users [mailto:[email protected]] On Behalf Of 
[email protected]
Sent: Friday, February 08, 2013 2:04 PM
To: riak-users
Subject: [*** SPAM ***] - MapReduce JavaScript function arguments. - Found 
word(s) UCE in the subject

 

Looking at the documentation on Basho I think that the arguments for a 
JavaScript Map and Reduce function are pretty well detailed. But one detail 
still eludes me. All of the samples show raw data in the database. I was 
wondering if I put JSON serialized objects into the database if I can access 
the members of the object like: 

 

       v.values[0].data.myField 

 

Where myField is a field of the object that I put in the database as JSON. In 
other words can I assume that the JavaScript will deserialize the JSON object? 

 

Thank you. 

_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to