Is it possible to use wix-storage with objects

Hi,
I have an object:
let objectA = {
a: x,
b: y,
c: z
};

and I’ve tried to transfer it using wix storage:

import {session} from ‘wix-storage’

session.setItem(“objectA”, objectA);

and I’ve put the getItem on the next page but something went wrong.
Isn’t it possible to use wix-storage for objects?

Thanks,
J.D.

You can stringify the object and store as a string. Then when you get the value from storage, parse it back to an object. I do this quite often for my own projects.

Thanks.