A user was confused when making a sequence from one of our hello world examples to our wordCount issue.
The issue is that hello returns a JSON object with an attribute "message" but wordcount expects an attribute "payload".
Two suggestions:
1) decide on a uniform convention of the field name used by all our samples that produce or consume a single value. Perhaps "payload" or "value".
2) enhance wordCount (and all our shell utils) as follows: add an optional parameter 'fieldName".
If fieldName is set, do the wordCount of the string of that field. If it's not set, then do the wordCount on the first field in the input object.
@sjfink commented on Fri Nov 11 2016
A user was confused when making a sequence from one of our hello world examples to our wordCount issue.
The issue is that hello returns a JSON object with an attribute "message" but wordcount expects an attribute "payload".
Two suggestions: 1) decide on a uniform convention of the field name used by all our samples that produce or consume a single value. Perhaps "payload" or "value".
2) enhance wordCount (and all our shell utils) as follows: add an optional parameter 'fieldName". If fieldName is set, do the wordCount of the string of that field. If it's not set, then do the wordCount on the first field in the input object.