Thursday, 26 April 2012

Spring-MongoDB: Checking if data member is of array type in map function.

If you'll ever have to do things like that, following code worked out perfectly for me:
if( Object.prototype.toString.call( myObj ) === '[object Array]' ) {}
source: http://stackoverflow.com/questions/4775722/javascript-check-if-object-is-array 

No comments:

Post a Comment