Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: reading a JSON object

by Corion (Patriarch)
on May 08, 2022 at 19:22 UTC ( [id://11143678]=note: print w/replies, xml ) Need Help??


in reply to reading a JSON object

I'm not sure what your question is. You are already reading the JSON data and extracting parts from it:

my $json = $ua->get($url)->res->json; ... my $json3 = $ua2->get($siteurl2)->res->json;

Maybe you can tell us where exactly you have problems, and show the relevant input data and what you expect your program to do?

Replies are listed 'Best First'.
Re^2: reading a JSON object
by anautismobserver (Sexton) on May 09, 2022 at 01:33 UTC
    I edited my original question to add a clarification.

      The new URL provides a different response, the code posted looks like it's based upon the code from a previous question some time ago. You need to alter the code to print the data. Which part are you experiencing problems with? Are you perhaps confused by how to address the fields in the JSON response?

Re^2: reading a JSON object
by anautismobserver (Sexton) on May 08, 2022 at 20:06 UTC
    I want to extract the timestamps and write them into a text file.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11143678]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-04-25 07:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found