Skip to content
This repository has been archived by the owner on Mar 24, 2024. It is now read-only.

How can i save data with promiss ? #46

Closed Answered by Marco5dev
Marco5dev asked this question in Q&A
Discussion options

You must be logged in to vote

i want to know ... in jsonverse ... How can i save data with promiss ?

Simple you can do it like this:

const dataName = 'MyData'; // Specify the data name
const dataToSave = { /* Data to be saved goes here */ };
 jsonverse
   .saveData(dataName, dataToSave)
     .then((result) => {
       // Data Saved Successfully
     })
     .catch((error) => {
       // Error Handling
      // you can use this commend to console and save the erro in logs file
      jsonverse.logError(error)  // result: [Error]: error
     });

Replies: 1 comment

Comment options

Marco5dev
Sep 23, 2023
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by Marco5dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant