Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

175
Vistas
How to Split Multiple array to each array and from each array to value in javascript

I am getting this from single PHP file with xmlhttprequest, Here is the result I am getting.

{request: {…}, service: Array(2)}
 service: (2) [{…}, {…}]
 request: {…}
 [[Prototype]]: Object

In the service property, I am getting 2 elements in an array and in request 1 array.

I want to separate both array then split value of the both array, so can any one help me with this how to do it in JavaScript.

Here is the code I am using to get data from PHP :

 var request = new XMLHttpRequest();
            request.open("POST", API_PATH + 'data.php');
            request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
            request.onreadystatechange = function () {
               if (request.readyState === 4) {
       
        
            request.onload = function(){

            let datareq = JSON.parse(request.responseText);
            

            console.log(datareq);


            }

               }
            };

            const data = {str , ltr};


               request.send(JSON.stringify(data));
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda