Changed to use filter instead of nested json