cancel
Showing results for 
Search instead for 
Did you mean: 

Check Incoming data is null

AdityaReja
New Contributor III

I’m getting data out of LDAP and i nees to route it to two different mappers depending upon whether the incoming data is null or not. But i’m unable to do this… any solution?

8 REPLIES 8

There should always be some all important piece of data, like a key. You can reasonably assume the whole record is null if IT is. What are you trying to do?

del
Contributor III

@AdityaReja, some snaps perform no action if there is no input data (i.e. $ == null). You may need to augment your input to trigger the snap as has been explained in this post.

nisars
New Contributor III

I also use the router snap and check if a field exists using the .hasOwnProperty() function

I got stuck using what they suggested, but there are a few options. Still the point is that some fields simply aren’t created.