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

@PaulRBerg here is an example to use list datasource context

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

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@PaulRBerg
Comment options

Answer selected by PaulRBerg
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