How to read the array action with array output?

Hi Folks,
I have just written the workflow with action and I want the output input command with output result. How can I achieve that in this case would appreciate if someone help here

outer_task_shell_linux_esxi:
    action: jas.command_shell_execution
    input:
      commands: '<% ctx(command)[0] %>'
      host: '<% item(host) %>'
      username: '<% item(user) %>'
      password: '<% item(pass) %>'
    with: host,user,pass in <% zip(ctx(hosts),ctx(username),ctx(password)) %>
    next:
      - when: <% succeeded() %>
        publish:
          - task_status: <% result() %>
        do: print_task1
      - when: <% failed() %>
        publish:
          - task_status: <% result() %>

   print_task1:
    action: core.echo
    input:
      message: <% ctx().task_status %> | to_json_string
    next:
      - when: <% succeeded() %>
        publish:
          - task_status1: <% result().stdout %>
        do: print_task2

   print_task2:
    action: core.echo
    input:
      message: <% ctx().task_status1 %>