Two page spread json objects

Outgoing:

var orderData=[
{ "firstName":"John" , "lastName":"Doe" },
{ "firstName":"Anna" , "lastName":"Smith" },
{ "firstName":"Peter" , "lastName":"Jones" }
]

sessionStorage.setItem ( 'cache name', JSON.stringify (orderData));

receive:

const dataB = JSON.parse (sessionStorage.getItem ( 'cache name'));

Guess you like

Origin www.cnblogs.com/modestyprogress/p/11579426.html