{ created_time: '2022-04-15T04:51:32+0000', message: 'Chapter 31 of BJ Archmage is out\n', id: '××××××\' }, { created_time: '2022-04-15T04:49:43+0000', message: 'Chapter 35 of Second Life on the Red Carpet is out\n', id: '×××' }, { created_time: '2022-04-14T01:51:41+0000', message: 'Damn', id: '×××' }, { created_time: '2022-03-21T06:48:23+0000', message: 'Uncle just got angry3', id: '××××' }, { created_time: '2022-01-14T11:07:16+0000', message: 'High-school Manhwa where mc is bullied at first but becomes stronger., id: '××××' } ]Arriba está el json que obtengo usando la api de Facebook cuando trato de recorrer cada mensaje y compararlo, solo compara un bucle para el título actual. eran falsos si no, entonces para romper el bucle j allí y continuar con el bucle i para obtener el siguiente título y compararlo nuevamente, y así sucesivamente ...
const response = await axios("https://graph.facebook.com/v13.0/××××/feed?limit=5&access_token=×××××××); const data = response.data; for(var i=0;i<2;i++){ //some other codes. //some other codes. //some other codes. for(var j=0;j<4;j++){ if(data.data[j].message.includes(getchap + " of " + chaptitle)){ //getchap and chaptitle changes every time I loop is executed console.log(data.data[j].message); console.log("post exist so skipping"); break; } else{ console.log("posted"); axios.post("https://graph.facebook.com/v13.0/××××××); break; } } } Any help to me beginner would be appreciated. Thanks in advance!