I have created a custom tag in view/lib/tag_modules/proj_custom_tags.erl as follows
first_zip_code_label(Variables, Options) ->
Name = proplists:get_value(name, Variables),
ListData = proplists:get_value(list_data, Variables),
io:format("~n~n ListData ~p~n~n",[ListData]),
[{zip1, Zip1},{zip2, Zip2}] = lists:nth(ListData),
unicode:characters_to_binary(binary:bin_to_list(Zip1) ++ "-" ++binary:bin_to_list(Zip2)).We can use this tag in the view as follows
{% first_zip_code_label name="F_03_0010" list_data=data.list_of_zip_codes %}If
data.list_of_zip_codes = [[{zip1,<<>>},{zip2,<<>>}],[{zip1,<<>>},{zip2,<<>>}]]then in the custom tag at gives the value of data.list_of_zip_codes as=>
[[[{zip1,<<>>}],[{zip2,<<>>}]],[[{zip1,<<>>}],[{zip2,<<>>}]]]But it should give value as=>
[[{zip1,<<>>},{zip2,<<>>}],[{zip1,<<>>},{zip2,<<>>}]]
Here I am not getting that why in the custom tag it is giving different value ?