Hello!
I have some functions which take objects as arguments and returns the modified object.
Also need to store the object in Appery database and use createService and updateService to create and update the object.
My questions:
Should I set collection column to string or object? If object, is this format correct?
code {"mon":[],"tue":[],"wed":[],"thu":[],"fri":[],"sat":[],"sun":[]} /codeI have some problems using JSON.stringify to store object in local storage (see code below)
codevar op_hours = {"mon": [],
"tue": [],
"wed": [],
"thu": [],
"fri": [],
"sat": [],
"sun": []
};localStorage.setItem('_ophoursArr', JSON.stringify(op_hours));
/code
This gives error Uncaught TypeError: undefined is not a function at appery.js:1752
line 1752: newValue = value.replace(this.paramPattern, __performHeaderParametersSubstitution);JSON.stringify is successfully executed and the value stored into Local storage, but then the error appears.
How to use a local storage value to set createService or updateService, if the requested value is to be an object? I can only use strings in LSV and thus can only send strings as request values.
Thank you!