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

  • SEARCH
  • Home
  • 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 3695490
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:37:27+00:00 2026-05-19T04:37:27+00:00

Today I have a Ajax solution where the server keeps track of selections are

  • 0

Today I have a Ajax solution where the server keeps track of selections are doing and updates the page. I’m redoing this so it will be all done with javascript on the client until the user actually submit the data, performance where quite bad under load with the old solution. (C#, ASP.NET 4.0)

Found a nice way of storing an Array by first serialize it with json link text

Say I have an array like this: {Id, Value}

Any advise how I can store several of the arrays above to a cookie?

  • 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-05-19T04:37:27+00:00Added an answer on May 19, 2026 at 4:37 am

    Say I have an array like this: {Id, Value}

    That’s not an array. That’s an object. You can multiple copies of those in an array:

    [
        {"foo": "bar"},
        {"foo": "baz"},
        {"foo": "boom"}
    ]
    

    That’s a valid JSON string for an array containing objects —in this case, objects with a single property, foo, each of which has its own value, but the objects don’t have to have the same properties, and they can have multiple properties. For instance:

    [
        {},
        ["zero", "one", "two", "three"],
        "I'm just a string",
        {
           "f0": "foo zero",
           "f1": "foo one",
           "f2": "foo two",
           "all": ["foo zero", "foo one", "foo two"]
        },
        42
    ]
    

    That’s a valid JSON string for an array with five entries:

    • An object with no properties (e.g., a “blank” object).
    • An array with four entries.
    • A string.
    • An object with four properties: f0, f1, f2, and all. f0, f1, and f2 all have string values; all has an array of strings as a value.
    • The answer to Life, The Universe, and Everything.

    You can turn an object or array into a valid JSON string (stringify), and reverse the process (parse) client-side using any of several libraries. Crockford (the inventer of JSON) has several on his github page, most notably json2.js although json2.js relies on eval for parsing; since that’s not really ideal you can use json_parse.js (a recursive descent parser that doesn’t use eval) or json_parse_state.js (a state machine that doesn’t use eval) instead.

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

Sidebar

Related Questions

Today I have this structure... tableA.id tableB.id tableB.tableAId (fk) tableC.id tableC.tableBId (fk) Is it
Today i have been interested in answers on this: where you create your work
Today we have a windows application that, using an OCX, creates a web page
Must be really dumb today - sorry in advance; anyhow have this unordered list
I'm validating a Zend form with Ajax and have come up with this: $('#some-dialog-i-have
Today I have a bit of a problem. I have an ajax script that
I had some help today with a need and this is what I have
We have a custom Visualforce page that is within the Account page layout. This
I have spent 8 hours or so today trying to figure this out. I
I have a script that retrieves objects from a remote server through an Ajax

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.