JSON output with filtering