anchor.diff:  
   %% @hidden
   %% put filters in order so we can process (once) sequentially
  -filter1([Filter | T], L, []) ->
  +filter1([Filter | T], JSON, []) ->
   	[Name | RevPath] = lists:reverse(Filter),
  -	filter1(T, L, [{[Name], RevPath}]);
  -filter1([Filter | T1], L, [{Names, RevPath} | T2] = Acc) ->
  +	filter1(T, JSON, [{[Name], RevPath}]);
  +filter1([Filter | T1], JSON, [{Names, RevPath} | T2] = Acc) ->
   	case lists:reverse(Filter) of
   		[Name | RevPath] ->
  -			filter1(T1, L, [{[Name | Names], RevPath} | T2]);
  +			filter1(T1, JSON, [{[Name | Names], RevPath} | T2]);
   		[Name | NewRevPath] ->
  -			filter1(T1, L, [{[Name], NewRevPath} | Acc])
  -	end;
  -filter1([], L, Acc) ->
  +			filter1(T1, JSON, [{[Name], NewRevPath} | Acc])
  +	end;
  +filter1([], {Type, _} = JSON, Acc) when Type == struct; Type == array ->
   	Filters = [{lists:reverse(Path), lists:reverse(Names)}
   			|| {Names, Path} <- lists:reverse(Acc)],
  -	lists:reverse(filter2(Filters, L, [])).
  +	{Type, NewJSON} = filter2(Filters, JSON),
  +	{Type, lists:reverse(NewJSON)}.
  +%% @hidden
  +filter2(Filters, {struct, L1}) ->
  +	{struct, filter3(Filters, L1, [])};
  +filter2(Filters, {array, L1}) ->
  +	{array, filter4(Filters, L1, [])}.
   %% @hidden
   %% filter fields from object
  -filter2([{[], [H | T1]} | T2] = _Filters, L, Acc) ->
  +filter3([{[], [H | T1]} | T2] = _Filters, L, Acc) ->
   	case lists:keyfind(H, 1, L) of
   		false ->
  -			filter2([{[], T1} | T2], L, Acc);
  +			filter3([{[], T1} | T2], L, Acc);
   		KV ->
  -			filter2([{[], T1} | T2], L, [KV | Acc])
  +			filter3([{[], T1} | T2], L, [KV | Acc])
   	end;
   %% depth first traversal for complex filters
  -filter2([{[H | _], _} | T] = Filters, L1, Acc) ->
  +filter3([{[H | _], _} | T] = Filters, L1, Acc) ->
   	case lists:keyfind(H, 1, L1) of
   		false ->
  -			filter2(T, L1, Acc);
  -		{H, {Type, L2}} when Type == struct; Type == array ->
  +			filter3(T, L1, Acc);
  +		{H, {Type, _} = JSON} when Type == struct; Type == array ->
   			% remove parent from filter path
   			F1 = fun({[Prefix | Suffix], Names}) when Prefix == H ->
   						{true, {Suffix, Names}};
  
positive.code: %%
  %% @throws {error, 400}
  %%
  filter(Filters, {struct, L} = _Object) when is_list(Filters) ->
  	Filters1 = case lists:member($(, Filters) of
  		true ->
  			expand(Filters, []);
  
negative.code: 				false
  	end,
  	Filters5 = lists:sort(Fsort, Filters4),
  	filter1(Filters5, JsonObject, []).
  
  -spec range(Range) -> Result
  	when
  