obsidian-dataview icon indicating copy to clipboard operation
obsidian-dataview copied to clipboard

Add support for negative array indexes (from end)

Open olivr70 opened this issue 1 year ago • 1 comments

[//]:

Is your feature request related to a problem? Please describe. To get the name of folder for a note, I currently use `reverse(split(file.path, "/"))[1]

Describe the solution you'd like I would like to able to write

split(prop)[-1] to get the last item 

Describe alternatives you've considered I currently use the code above reverse(split())

olivr70 avatar Feb 19 '24 17:02 olivr70

If #2238 is accepted, you'll be able to do slice(split(prop), -1) to do just this.

holroy avatar Feb 28 '24 18:02 holroy