How to call a method with dfx passing an array

I would like to call a canister method wit the following candid description:
setData: (vec nat) -> ();

How should I update the following dfs call to pass the vector [1,2,3]? (I have the did file)
dfx canister call test_backend setData [1,2,3]

dfx canister call test_backend setData '(vec {1, 2, 3})' if iā€™m not mistaking

2 Likes

Almost (, ā†’ ;):
dfx canister call test_backend setData '(vec {1; 2; 3})'

2 Likes

ahh good catch, always get confused what to use, guess the , is only used to split args.

1 Like