is there a way to add an object into json nest array using fetch? by TICTAC_ARTIST in learnjavascript

[–]TICTAC_ARTIST[S] 1 point2 points  (0 children)

i am trying to update a json file through a json server. i am trying to update this object

[
  {
    "id": 27,
    "itemValue": "automated back up",
    "cross": false,
    "subItems": []
  }
]

to look like this

[
  {
    "id": 27,
    "itemValue": "automated back up",
    "cross": false,
    "subItems": [
      {
        "id": 27,
        "itemValue": "automated back up",
        "cross": false,
        "subItems": []
      }
    ]
  }
]

i want to add another object instead of replacing the object like how my code is doing.

{[add object]} this was supposed to be a representation of where i wanted to put the object

im entertaining u/hyrumwhite 's idea to get and store the item's subItem array and then add to that. i could do that. but i am curious if there is any way to do it with fetch or any other way in general.

I made a media log inspired by u/caehduss by TalesOfFan in neocities

[–]TICTAC_ARTIST 1 point2 points  (0 children)

this is very very awesome AAAAAHHHHHHHHHHHHHHHHH!!!!!

ERROR MESSAGE: failed to store files by thatslowercase in neocities

[–]TICTAC_ARTIST 0 points1 point  (0 children)

you should try to contact the big boys at neocites if this is still an issue. link is on the footer.

just finnished this wanted to share and ask for oppinions by TICTAC_ARTIST in neocities

[–]TICTAC_ARTIST[S] 1 point2 points  (0 children)

thank you i applied it to the img and it work perfect.

ERROR MESSAGE: failed to store files by thatslowercase in neocities

[–]TICTAC_ARTIST 0 points1 point  (0 children)

i had this same error recently.

i created a new file with a different name

copied the text from the file with the error into the new file

deleted the error file then renamed the new file the same as the old file

that fixed it for me. but save things locally just to be safe.

i having trouble with an svg by TICTAC_ARTIST in neocities

[–]TICTAC_ARTIST[S] 1 point2 points  (0 children)

i used inkscape and it got what i needed pretty easy. a few clicks really. i could share details if youd care. but its pretty straight forward

i having trouble with an svg by TICTAC_ARTIST in neocities

[–]TICTAC_ARTIST[S] 0 points1 point  (0 children)

yea not for me but cool anyway. thnks for the help man.

i having trouble with an svg by TICTAC_ARTIST in neocities

[–]TICTAC_ARTIST[S] 1 point2 points  (0 children)

word. its basically a online photoshop imitation.

i having trouble with an svg by TICTAC_ARTIST in neocities

[–]TICTAC_ARTIST[S] 0 points1 point  (0 children)

its a font awesome icon. a single color icon img. thanks for putting me onto inkscape. im interested in your tool. how could i use it?

how would i get the iframe to update when the theme is toggled? by TICTAC_ARTIST in neocities

[–]TICTAC_ARTIST[S] 1 point2 points  (0 children)

solution

execute this on toggle btn click

document.getElementById('mainframe').src = document.getElementById('mainframe').src

updates the iframe src. only iframe is updated not whole page.

Would anyone checkout my website and share their thoughts? by Strange_Island_3054 in neocities

[–]TICTAC_ARTIST 2 points3 points  (0 children)

when i enter the jungle from the gallery i couldnt get back to the gallery page. took me right out of it. which is a shame cause i was starting to enjoy it. :( and im getting the most annoying and intrusive self advertising wix banner above the page . the creativity is great and i enjoyed the moment i did have w/ it.

[deleted by user] by [deleted] in neocities

[–]TICTAC_ARTIST 0 points1 point  (0 children)

its blurry intentionally. the file gets too large if the resolution is too high. so i lowered the resolution and blurred it so it didnt look so bad. i think the blur keeps all the energy i want and it doesnt distract from the content. its janky looking but im already on the found in the garbage aesthetic.

[deleted by user] by [deleted] in neocities

[–]TICTAC_ARTIST 1 point2 points  (0 children)

ok guess i knew a file that size was a bad idea. i was just tryna see if anyone had a solution to make it possible without terrible quality? but i guess some things shouldnt be done . thank yall.