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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T00:31:32+00:00 2026-05-30T00:31:32+00:00

first post ever here I’m trying to replicate this sort of JSON object so

  • 0

first post ever here

I’m trying to replicate this sort of JSON object so that I can store it inside localStorage with stringify:

I want to be able to create a new noteState inside of history whenever an event is caught but do not know necessarily how to go about doing so..

var history = {
    "noteState1": [
        {created: new Date(),
        modified: new Date(),
        left: "100",
        top: "200",
        text: "hello"},

        {created: new Date(),
        modified: new Date(),
        left: "150",
        top: "250",
        text: "new"},

        {created: new Date(),
        modified: new Date(),
        left: "200",
        top: "300",
        text: "world"}
    ], 
    "noteState2": [
        {created: new Date(),
        modified: new Date(),
        left: "100",
        top: "200",
        text: "hello"},

        {created: new Date(),
        modified: new Date(),
        left: "150",
        top: "250",
        text: "new"},

        {created: new Date(),
        modified: new Date(),
        left: "200",
        top: "300",
        text: "world"}
    ]
}

how can i create a new member with a single array inside history?

  • 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-30T00:31:35+00:00Added an answer on May 30, 2026 at 12:31 am

    You don’t modify the json string – that’s too risky. Instead you convert it back to a native javascript array/object, use the regular array push/pop type operators on it, then convert back to a json string.

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

Sidebar

Related Questions

Original Question: This is my first post ever. I'm trying to learn ios programming
this is my first ever post here. I'm not sure if I've done the
First post, so here goes. I'm writing a script that does intelligent search and
first post here, I come in peace :) I've searched but can't quite find
My first post here, so i hope this is the right area. I am
This is my first post here and I wanted to get some input from
This is my first post here. I have a problem. I need to take
i'm new to this kind of things. Kinda the first post ever regarding programming,
first post here ever so forgive me if I am totally ignorant of all
This is my first post ever :). I have quite a bit of experience

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.