Route to port 1 if output is string , to port 2 if output is number

Hi,
I have to route based on the output type using router snap.
Route to port 1 if output is string , to port 2 if output is number.
How to I do that? Thank you.

Hi @Sahil,

You can include the ‘typeof’ function in a router snap. It will look something like this:

Regards,
Bojan

@Sahil

Also in the Router Snap, you can use the instanceof global function that will return true/false if the given object is an instance of the given type.

ex: $input instanceof ‘String’

Regards,
Spiro Taleski