CÓDIGO: let results = items[0].json.tasks[0].result; // Verifica se results é um array, se não for, transforma em um if (!Array.isArray(results)) { results = [results]; } // Classifica os resultados com base no lance baixo em ordem crescente results.sort((a, b) => a.low_top_of_page_bid - b.low_top_of_page_bid); let output = []; let keywords = new Set(); results.forEach(result => { if (result && result.monthly_searches && !keywords.has(result.keyword)) { keywords.add(result.keyword); result.monthly_searches.forEach(month => { if (month) { output.push({ json: { keyword: result.keyword, competition: result.competition, competition_index: result.competition_index, search_volume: result.search_volume, low_top_of_page_bid: result.low_top_of_page_bid, high_top_of_page_bid: result.high_top_of_page_bid, year: month.year, month: month.month, monthly_search_volume: month.search_volume } }); } }); } }); return output; BODY: [ { "location_code": 2840, "target": "{{ $json.link }}" } ]