javascript - How to filter information from an output that consists of "X": "Y", -
i'm working nodered , using twitter node. i'm trying figure out how reply users if tweet 'x'.
the output consists of load of information comma separated , consist of "x": "y",
as in "user": "sanderschaeffer", "tweet": "this tweet", "date": "01-02-2015",
etc.
how filter, preferably javascript or json, information contained "user"? output 'sanderschaeffer'?
or bottom-line: how reply user nodered? :)
apologies inconvenient title, don't know name of way of information output
you can use node-red switch node filter.
you can set act on msg.payload
value , use contains option , enter text want match on box.
this should allow tweets match through. want use function node craft suitable response.
edit:
to sending user id access within function node follows:
msg.tweet.user.screen_name
Comments
Post a Comment