How to generate a unique id for a JSON to be stored (using '@ionic/storage')

Good afternoon.

How to generate a unique id for a JSON to be stored (using ‘@ionic/storage’)?
For example, when writing JSON below?

{
     "Id": "??????",
     "Name": "Name",
     "Phone": "555-5555"
}

Note: Sorry, English is not translated.

I like RFC-4122 v4 UUIDs for this purpose. This library generates proper ones.

2 Likes