How to check if an entry already exist?
I found this query to check if an entry in the table already exists:
Which returns the response:
Result(1) [ { exists: false } ]
but how do I use it in a typescript if
statement to run conditional code?5 Replies
Probably not the best solution, but I do
Hello, @textYash! Your solution is good to check if an entry exists in the table. Could you please clarify what you want to achieve with
if
statement?
this works too!I'm not sure how to use the result returned by that query inside an if statement to take an action based on it
Which returns the response: Result(1) [ { exists: false } ]
I'm using typescript so how can I use eq or === on this?@textYash you can do smth like this
Oh twas easy
Thanks
SOLVED