Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support to pass a json as arg for js-script #1902

Merged
merged 4 commits into from
Oct 11, 2024
Merged

Conversation

pepoviola
Copy link
Collaborator

Add support for passing a json as arg to js-script. Should be single quoted json like:

alice: js-script ./0001-custom-json.js with '{"account": "alice", "nums": [0,1,2,3], "bool": true}' within 200 seconds

And in the script you have access to the Object directly

async function run(nodeName, networkInfo, argObject) {
    if (argObject.account != "alice") {
        console.log("JSON err: field name");
    }

cc: @bkontur

@pepoviola pepoviola merged commit b11637d into main Oct 11, 2024
22 checks passed
@pepoviola pepoviola deleted the feat-json-parser branch October 11, 2024 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant