I read this question How can I copy an array of arrays into clipboard using javascript and want to achieve something similar: first I execute $x(XPath)
to get an array of arrays:
I want to stringify this array but when I execute this:
JSON.stringify($x(XPath))
in the console the result looks like this:
There are 2915 (the expected number) of {}-pairs but they are all, as you can see, empty.
Why does Stringify work in the linked question, which to me seems very similar to my situation, but not in my case? I tried the sample/test in the linked question (const arr = [[1,2],[1,2]]; copyText(JSON.stringify(arr));
) and it worked as expected. How should I change my code to achieve the same result as the example in the linked question?