Result empty after using json2html script

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Result empty after using json2html script

L1 Bithead

I found the issue after using script json2html table to convert json array to HTML table.

 

it's return to empty vaule.

 

Do you have any idea?

1 accepted solution

Accepted Solutions

I did resolved by fixed the script with addition one line of code, after that just run in the playbook with json array input.

The result return correctly.

 

fixed by in fuction :

def get_json_from_string(value: Any) -> dict | str | None:
 
# FIX: If value is already a list or dict, return it immediately.
if isinstance(value, (list, dict)):
return value

View solution in original post

2 REPLIES 2

L1 Bithead

The documentation on this script is non-existent.  You can't just pass it context key.  Stringify the json and pass that.

I did resolved by fixed the script with addition one line of code, after that just run in the playbook with json array input.

The result return correctly.

 

fixed by in fuction :

def get_json_from_string(value: Any) -> dict | str | None:
 
# FIX: If value is already a list or dict, return it immediately.
if isinstance(value, (list, dict)):
return value
  • 1 accepted solution
  • 170 Views
  • 2 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!