0

I have a JSON object that has a bunch of data about witnesses to an accident. It looks like this:

{
  'name0': John Doe,
  'name1': Jane Doe
}

I would like to access them using a loop and apply them to my sessionStorage like this:

sessionStorage.setItem(`w${count}Name`, `data.name${count}`);

I can't seem to get this to work....

BackPacker777
  • 673
  • 2
  • 6
  • 21

0 Answers0