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 8319589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:22:19+00:00 2026-06-08T22:22:19+00:00

I’m new to jQuery and just playing for fun. I have some code that

  • 0

I’m new to jQuery and just playing for fun. I have some code that I want to try to modify for my needs but the current js file is getting its data from google spreadsheets and then returning each item as objects. I don’t use json to pass data from my server to jQuery so I’m wondering how I can convert json to objects.

The current way its doing it is(tabletop is the name of their js program that gets data from google docs):

Tabletop.init({
    key: timelineConfig.key,
    callback: setupTimeline,
    wanted: [timelineConfig.sheetName],
    postProcess: function(el){
        //alert(el['photourl']);
        el['timestamp'] = Date.parse(el['date']);
        el['display_date'] = el['displaydate'];
        el['read_more_url'] = el['readmoreurl'];
        el['photo_url'] = el['photourl'];
    }
});

I have added alerts all over the file and I think this is the area that gets the data and passes it on. I was thinking of trying to replace items in their object with objects from my json and see if it changes anything, but I’m unsure. Typrically I pass individual items via json,hashmaps, and lists, not sure how it works with objects or how to access objects(I simply call url’s that I create for the requests, $("#user-history").load("/cooltimeline/{{ user.id }}");). But where do I start if I want to turn json data into objects?

If it helps, here’s the demo of what I’m trying to do(but by having it use json data).

p.s. I’m really looking for the logic of how to complete what I’m trying to do and perhaps some ideas I’m missing so I can google them and learn.

  • 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-08T22:22:20+00:00Added an answer on June 8, 2026 at 10:22 pm

    Use use function JSON.parse(json) 🙂 Or jQuery.parseJSON(json)

    var json = '{"a":2}';
    var object = JSON.parse(json);
    
    alert(object.a);
    

    You should see alert with message: 2


    I don’t realy know if I understand your comment, but maybe you want just do this:

       postProcess: function(el){ //here el is JSON string
            el = JSON.parse(el); // now el is an object
            el.timestamp = Date.parse(el.date);
            el.display_date = el.displaydate;
            el.read_more_url = el.readmoreurl;
            el.photo_url = el.photourl;
    
            return el;
    
        }
    

    Btw. you do not need to use brackets on know property names without not standard names:

    el['timestamp'] === el.timestamp
    

    It will be easier if you paste your JSON

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I want to construct a data frame in an Rcpp function, but when I

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.