i'm trying to copy some jsons that my output query to clipboard without adding a transformer, just for debug purposes, also if i do console.log - it doesn't copy the output if i highlight it and copy..
For example -

here's a state parameter,
if i try to copy it

not everything is copied and i just really want the json of it to debug it externally
are_all_repos_selected
""
centralized_repo_name
""
created_at
"2022-10-19T09:13:29.751029"
creator
undefined
installation_id
undefined
is_active
false
name
undefined
owner
undefined
status
"pending"
status_code
""
vendor
"aws"
Hey @Ariel_Beck !
Here's a detailed guide to help you achieve copying JSON data to the clipboard for debugging purposes:
- Create the Inline Data Source
- Create a new JavaScript query and name it
arrayOfData
.
- I used the following code to create your mock data array:
return [
{
are_all_repos_selected: "",
centralized_repo_name: "",
created_at: "2022-10-19T09:13:29.751029",
creator: undefined,
installation_id: undefined,
is_active: false,
name: undefined,
owner: undefined,
status: "pending",
status_code: "",
vendor: "aws"
},
{
are_all_repos_selected: "",
centralized_repo_name: "",
created_at: "2022-10-19T09:13:29.751029",
creator: undefined,
installation_id: undefined,
is_active: false,
name: undefined,
owner: undefined,
status: "pending",
status_code: "",
vendor: "aws"
},
{
are_all_repos_selected: "",
centralized_repo_name: "",
created_at: "2022-10-19T09:13:29.751029",
creator: undefined,
installation_id: undefined,
is_active: false,
name: undefined,
owner: undefined,
status: "pending",
status_code: "",
vendor: "aws"
}
];
- Display the Data
- Created a text component.
- Set its Value to:
{{ JSON.stringify(arrayOfData.data, null, 2) }}
This ensures the JSON data is formatted as a string for easy viewing and copying
- Add a Button for Copying Data
- Set the button's Action to "Copy to clipboard".
- In the Value field, enter:
{{ text1.value }}


I hope this helps!
2 Likes