blacksmithgu / obsidian-dataview Public
generated from obsidianmd/obsidian-sample-pluginNew 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
Turn arrays/lists into strings #202
Comments
|
Thanks, I'll have to translate my whole query in JS but I guess it's better than nothing^^ |
|
Yeah, I was hesitant, too, at first. But probably worth checking out—you can do many wonderful and useful things with DataviewJS. |
|
I know haha, the more code-ish it gets, the more freedom you have. Thanks for the help btw, it's resolved now, but I don't know if I should close this or not since this is still only a workaround? |
|
I've added the |
|
Fixed for real in release 0.3.8. |
@blacksmithgu Thanks for that! Is this for dataview or dataviewjs? If the former, any chance of including an example of use in the docs, specifically how and where it would go in our list or table queries? I've had no luck implementing it in either. |
|
It works like this ( Which I used to write in dv.table(
['File', 'Connections'],
dv.pages('[[Foo]]').map((page) => {
return [
`[[${page.file.name}]]`,
page.file.outlinks
.map((link) => {
return `[[${link.path.replace(/\.md$/, '')}]]`;
})
.join(', ')
];
})
); |
|
@ryanpcmcquen Thanks for taking the time to respond. I appreciate it. |

Hi, this is something I've been trying to solve myself but with no luck.
I have a table view that displays the tags of the query-ed files, but since I have lots of them, I feel like it's a waste of space to use bullet lists for tags.
Instead I just want to render the tags in a single line, not in a bulleted list format, this way:
(this is a manually-created table, looks much better)
I searched but didn't find any functions who could help.
A possible solution would be to add a simple function that turns arrays into string, with an optional argument for the separator? Something like :
str(array, " ")
The text was updated successfully, but these errors were encountered: