Skip to content

How to read a List from a data source context? #2025

Closed Answered by shiyasmohd
PaulRBerg asked this question in Q&A
Discussion options

You must be logged in to vote

Small correction. Corrected Code.

export function getStringArray(key: string): string[] {
  const context = dataSource.context();
  const value = context.get("list_example")?.toArray();
  return value!.map<string>(item => item.toBigInt().toString());;
}

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@PaulRBerg
Comment options

@PaulRBerg
Comment options

@shiyasmohd
Comment options

Answer selected by shiyasmohd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants