I have an api query that runs successfully and returns a JSON Object.
I then have a transformer1 that maps the records from the object like this:
let finalData = {{apiQuery.data.records.map(records => records.fields)}};
return finalData;
I want to put this return into local storage.
I try this:
let finalData = {{apiQuery.data.records.map(records => records.fields)}};
localStorage.setValue('insertedHere',finalVal)
return finalData;
But I get 'function run failed' error.
If I setup a second query to run JS with the following code I can get the data into localStorage. What is my admittedly somewhat beginner brain missing?
function storeDataInLocalStorage() {
const data = transformer1.value;
localStorage.setValue('insertedHere',data)
}
return storeDataInLocalStorage();
Thanks for any thoughts.
Best,
Brady