Let’s say I am creating an object of the type:
struct Table1 has key, store{
id: UID,
list: Table<String, bool>
}
In the package, I have a function that checks if a String-type element is present on the table. This is the function that returns true if the element is present on the table using the contrains
method for Table
.
public fun check_channel(
table: &mut Table1,
element: String
): bool{
return table::contains(&mut table.list, element)
}
Now using the SJI TS SDK how can I call this function to query the table?