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

160
Vistas
Get a value of the string in console.log from a separate js

I'm looking for a way to get to console.log right from my js script and then search for the string "PlatformID:55564". I want to grab this id 55564 and put it to my script button function. I want to get the total web page console log, not the one that is generated by a script.

I know it's a bad approach to read the console, but I'm particularly interested in this one. I had already grabbed the console to the file, using the example below, but I'm struggling to get the id value from it:

var logBackup = console.log;
var logMessages = [];

console.log = function() {
    logMessages.push.apply(logMessages, arguments);
    logBackup.apply(console, arguments);
};

I'm particularly interested to fill my id value as a string key here:

params['platformId'] = '55564'; (I suppose the method should apply here, I'm a big beginner in js so I don't know how to search a string and then get a value of it)

Id comes in the console as: platformId:55564

I need to search for "platformId:" in the console, grab a dynamic value to the right, and put it in my script as:

params['platformId'] = '55564'

Please advice, Regards

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