I am trying to implement interfacing for storing data to cassandra using helenus module. Using thrift driver, I am inserting and getting the data.
keySpace.get(cfName, function (err, cf) {
cf.insert(key, storData, {consistency :
helenus.ConsistencyLevel.ANY}, function(err) {
}
Now I am getting the data as below:
keySpace.get(cfName, function (err, cf) {
cf.get(key, function(err, row) {
row.forEach(function(name,value,ts,ttl){
console.log("Getting NAME AS:", name.toString(),
value.toString());
});
});
But what I am observing is if the data stored is JSON level 1, then I am able to retrieve the data correctly, as for example:
{"a":"b", "c":"d"}
This I am able to retrieve using above get operation, but if it is multi level, then I am getting the data as [Object Object], example JSON:
{"c": [{"a":"b"}]}
This is not working for me. Please let me know where I am doing mistake.
Regards, -M-