How to include an element inside the object with “node set”?
I’m making a request to report the recurrence of products in the order from the recurrence of customers, in order to generate a list of products.
It is necessary that an item with the purchase number be inserted into the purchase object in each item of the array.
for example:
"item":{
"numeroPedidoLoja": "2000005891958290", //item to be inserted
"codigo":"13545-C",
...
Below is the model of the array that I want to iterate and include the item “NumeroOrderLoja” of each purchase order:
"numeroPedidoLoja": "2000005891958290",
"itens":[
{
"item":{
"codigo":" 13545-CT-9",
"descricao":"Balança Digital Cozinha Receita E Dieta Precisão 1g Até 10kg Sf-400 Branco",
"quantidade":"6.0000",
"valorunidade":"7.8900000000",
"precocusto":null,
"descontoItem":"0.00",
"un":"UN",
"pesoBruto":"0.00000",
"largura":null,
"altura":null,
"profundidade":null,
"descricaoDetalhada":"",
"unidadeMedida":"cm",
"gtin":""
}
},
{
"item":{
"codigo":"13545-C",
"descricao":"Balança De Cozinha Digital Electronic Sf-400 Pesa Até 10kg Branco",
"quantidade":"4.0000",
"valorunidade":"10.0000000000",
"precocusto":null,
"descontoItem":"0.00",
"un":"UN",
"pesoBruto":"0.00000",
"largura":null,
"altura":null,
"profundidade":null,
"descricaoDetalhada":"",
"unidadeMedida":"cm",
"gtin":""
}
}
],