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

97
Views
Javascript filter cachedata

How can i filter the Event_Type ? what I want is to get the value of Event_Type which is the MT

this is my current code

        if (cachedData) {
            let cachedDatas = JSON.parse(cachedData);
            for (var data in cachedDatas) {
                var keys = data == 'Event_Type' ? 'R150274705' : data;
                console.log("keys", keys)
                let code = data.filter((val) => {
                    return cachedDatas['Event_Type'] == val.code;
                })
            }
        }

this is the data

{"Event_Type":"MT","Subject":"","startDate":"07/05/2022 11:43 AM","startDateRaw":"2022-05-07T03","description":""}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

What about a very simple solution like this?

const jsonStr='{"Event_Type":"MT","Subject":"","startDate":"07/05/2022 11:43 AM","startDateRaw":"2022-05-07T03","description":""}';

console.log(JSON.parse(jsonStr).Event_Type);

about 4 years ago · Juan Pablo Isaza Report
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!