GithubHelp home page GithubHelp logo

Foursquare node allows for output to multiple messages, but does not modify the node's number of outputs. about node-red-web-nodes HOT 2 CLOSED

node-red avatar node-red commented on July 21, 2024
Foursquare node allows for output to multiple messages, but does not modify the node's number of outputs.

from node-red-web-nodes.

Comments (2)

knolleary avatar knolleary commented on July 21, 2024

@lostinthestory the node is not expected to vary the number of outputs.

When you pass an array to node.send, each element in that array maps to an output of the node. If one of those elements in the array is itself an array of messages, each of those messages is sent to that output, one at a time.

If you look at where the 4sq node constructs what it passes to node.send in multiple messages case, you can see it builds an array of messages here, but then wraps that in array before passing to node.send here.

The net effect is that If multiple messages are required, they are all emitted one at a time from the single output.

from node-red-web-nodes.

codymwalker avatar codymwalker commented on July 21, 2024

Ah ha!
Thanks @knolleary, I didn't notice it was being passed as a double array despite staring the code staring in the face.
I was trying to use the same approach elsewhere, and could not get more than the first msg unless I added additional output nodes.

from node-red-web-nodes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.