Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8704675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:10:04+00:00 2026-06-13T03:10:04+00:00

I’m using json.el, and furl.el to get time entries from toggl.com’s API – Unfortunately

  • 0

I’m using json.el, and furl.el to get time entries from toggl.com’s API – Unfortunately I don’t think it’s seperating the response into multiple lists:

JSON Response (Two entries in data):

{"data":[{"id":50439783,"description":"bar","billable":false,"start":"2012-10-20T18:07:00Z","stop":"2012-10-20T22:39:00Z","duration":16320,"workspace":{"id":172049,"name":"Dan's workspace"},"tag_names":[],"ignore_start_and_stop":false,"updated_at":"2012-10-20T22:40:26Z","user_id":231062},{"id":50440682,"description":"Test Time Entry","billable":false,"start":"2012-10-20T23:40:16Z","stop":"2012-10-20T23:50:16Z","duration":600,"workspace":{"id":172049,"name":"Dan's workspace"},"tag_names":[],"ignore_start_and_stop":false,"updated_at":"2012-10-20T23:51:32Z","user_id":231062}],"related_data_updated_at":"2012-10-19T00:00:00Z"}

json-read-from-string response:

(related_data_updated_at . 2012-10-19T00:00:00Z)                                                                                                                          
(data . [((user_id . 231062) (updated_at . 2012-10-20T22:40:26Z) (ignore_start_and_stop . :json-false) (tag_names . []) (workspace ... ...) (duration . 16320) (stop . 20\
12-10-20T22:39:00Z) (start . 2012-10-20T18:07:00Z) (billable . :json-false) (description . bar) (id . 50439783)) ((user_id . 231062) (updated_at . 2012-10-20T23:51:32Z) \
(ignore_start_and_stop . :json-false) (tag_names . []) (workspace ... ...) (duration . 600) (stop . 2012-10-20T23:50:16Z) (start . 2012-10-20T23:40:16Z) (billable . :jso\
n-false) (description . Test Time Entry) (id . 50440682))])

So if that list is considered multiple entries, how could I access the first? car displays related_data_updated_at, and the key data. cdr displays the val of related_data_updated_at, and everything else.

I don’t think the elisp will help much, but here it is just incase:

(defun toggl-display-time-entries(json-string)                                                                                                                            
  (with-current-buffer (get-buffer-create "Toggl")                                                                                                                        
    (erase-buffer)                                                                                                                                                        
    (let ((inhibit-read-only t)                                                                                                                                           
          (time-entries (json-read-from-string json-string)))                                                                                                             
      (dolist (time-entry time-entries)                                                                                                                                   
        (newline)                                                                                                                                                         
        (insert (format "%s" (cdr time-entry)))))))
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T03:10:05+00:00Added an answer on June 13, 2026 at 3:10 am

    You’re close but you need to extract the ‘data and then iterate over the array, not a list. For example this prints the user id from each item in the array:

    (let ((array-of-times
           (cdr 
        (assoc 'data
               (json-read-from-string json-string)))))
      (let ((c (length array-of-times)))
        (dotimes (n c)
          (insert (format "user_id %s\n" (cdr (assoc 'user_id (elt array-of-times n))))))))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm making a simple page using Google Maps API 3. My first. One marker
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
We're building an app, our first using Rails 3, and we're having to build

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.