Array interpreted as string in inline fields
See original GitHub issueDescribe the bug When a list is used within an inline field, it is interpreted as a string. If the same field is used in the Frontmatter, it works as expected.
To Reproduce
- Create a note with the following content:
elements:: [3, 5, 6]
#test
- Create a note with the following content:
```dataview
table
elements[0] as "First"
from #test
```
- Turn on preview
- The result is:
File | First |
---|---|
test_list | [ |
Expected behavior
File | First |
---|---|
test_list | 3 |
Desktop (please complete the following information):
- OS: macOS Catalina 0.15.7
- Obsidian Version: 0.12.12
- Dataview Version: 0.4.4
Additional context
If the field is used in the frontmatter, it works as expected:
---
elements: [3, 5, 6]
---
#test
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Transform an array into a string inline - Stack Overflow
Use string.Join . In .NET 3.5 and earlier you need to convert to a string array first; in .NET 4 there's an overload...
Read more >Java String Array- Tutorial With Code Examples
In the above String Array, the initializations are inline initializations. The String Array is initialized at the same time as it is declared....
Read more >Array.from() - JavaScript - MDN Web Docs
The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object.
Read more >Zig Language Reference
Dereferencing string literals converts them to Arrays. ... in source code carry their UTF-8 meaning into the content of the string in the...
Read more >Nim Manual - Nim Programming Language
(access a tuple/object field operator) and [] (array/string/sequence index operator) operators perform implicit dereferencing operations for reference types:
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The fix here got caught up in some other inline field improvements and will be released as part of 0.5.0.
Punting to 0.4.6 later this week to not delay the current release too long.