Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

114
Views
Cómo recorrer primero la matriz y verificar y solo ejecutar otra condición si todas las condiciones son falsas
{ 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!
about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!