nosql export command to extract filtered result of query to a file. db.collection.exportFile() works, but that is for one complete collection. Would like to do the same for a filter query too

Am using DB2 10.5's nosql db

For example: db.newsprofile.exportFile("C:\newsprofile.js");

The above exports the entire newsprofile collection in my nosqldb to a file.

Now say for a query i write

db.newsprofile.find({status:'np'});. Need to export the filtered data of this query to similarly a file.

The console does not display the complete information, hence would like to export the resultant data from the filtered query to a file to check the data queried.