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

165
Views
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
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!