Hello,
I'm trying to insert a script on my output variable. When I only put the output variable with the value ${P_result} that's all right, but if I inser the code, give the error: Error executing macro: get_array
required parameter: my_father is not spe... (7 characters left)
the code:
<#function get_array my_father my_son>
<#if my_father?is_hash>
<#if my_father[my_son]?exists>
<#if my_father[my_son]?is_sequence>
<#assign my_array = my_father[my_son]>
<#else>
<#assign my_array = [my_father[my_son]?eval]>
</#if>
<#else>
<#assign my_array = []>
</#if>
<#else>
<#assign my_array = []>
</#if>
<#return my_array>
</#function>
<#assign entries = get_array(P_result.feed,"entry")>
<#assign gera_result = []>
<#list entries as x>
<#assign gera_result = gera_result + [{"Nome Fantasia":x.NomeFantasia,"ID":
x.id,"CNPJ/CPF":x.CNPJ_CPF,"IE":x.IE,"Razão Social":x.RazaoSocial,"Logradouro":x.Logradouro,"Nº":x.LogradouroNumero,"Cidade":x.Cidade,"Bairro":x.Bairro,"CEP":x.CEP,"Telefone":x.Telefone,"Celular":x.Celular}]>
</#list>
${gera_result}
Can you help me?
Best regards