Using a JSON field as an id
Hello! I want to cache API results in the database and I was wondering if it'd be possible to use the
id in the JSON field as an id, perhaps through @@id or some client extension?Solution:Jump to solution
Hello @PIat 👋
You could store the API result in a JSON field and also store the ID you want to use in a separate field marked as
@id. However it won't be possible to skip having an id field altogether.
You can use a client extension to manipulate the data before saving it to the database. So essentially, getting the id from JSON and using the same value in the actual id column...2 Replies
Solution
Hello @PIat 👋
You could store the API result in a JSON field and also store the ID you want to use in a separate field marked as
@id. However it won't be possible to skip having an id field altogether.
You can use a client extension to manipulate the data before saving it to the database. So essentially, getting the id from JSON and using the same value in the actual id columnAlright! Thank you a lot! Sounds like a plan!