This is what worked for me:
asset Ask identified by askId
{
o String askId
o String title
o String[] options
o Integer[] votes
}
asset Poll identified by pollId
{
o String pollId
--> Ask[] asks
}
transaction count {
--> Poll pollId
}
transaction processor function :
/**
* count transaction
* @param {org.sample.count} count
* @transaction
*/
function count(count) {
count.pollId.asks.forEach(function(ask) {
var serializer = getSerializer()
var serializer = getSerializer();
var jsonObj = serializer.toJSON(ask);
console.log("Ask: ", ask);
console.log("Ask jsonObj: ", jsonObj);
});
}
try this and see if this works