Create helper function output_as_json
Add options parser in usage.cpp
Add argument --filter