#Get one KV entry by cursor
3 messages · Page 1 of 1 (latest)
Not exactly knows your intention, but KV's list returns an iterator with option to limit the result. In your case, you can set limit to 1.
Then use the cursor of the iterator to advance.
let cursor;
let iter = db.list({ prefix: ["users"] }, { limit: 1, cursor });
cursor = iter.cursor;
iter = db.list({ prefix: ["users"] }, { limit: 1, cursor, };