Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

159
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda