I've encountered an issue which I need to resolve, namely: How to get arecord index of a named property from a data tiddler?

Say, I've got the following set of records in a data tiddler:

*{"oct":31,"nov":30,"dec":31}*

As one can see the number index value of the named property, say, *"nov"* is2.

But how can I get this number index using a macros of a plugin?

I feel that it should be somehow simply, but I've no idea how.

I would be grateful for your help.

Olegh

--You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.To post to this group, send email to ***@googlegroups.com.Visit this group at https://groups.google.com/group/tiddlywiki.To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/623ce7a2-4cfe-4dfa-b406-516fe2dea579%40googlegroups.com.For more options, visit https://groups.google.com/d/optout.

you can do it in different ways. lookat https://tiddlywiki.com/#getindex%20Operator

BurningTreeC

Post by oleghbondDear All,I've encountered an issue which I need to resolve, namely: How to get arecord index of a named property from a data tiddler?*{"oct":31,"nov":30,"dec":31}*As one can see the number index value of the named property, say, *"nov"* is2.But how can I get this number index using a macros of a plugin?I feel that it should be somehow simply, but I've no idea how.I would be grateful for your help.Olegh

--You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.To post to this group, send email to ***@googlegroups.com.Visit this group at https://groups.google.com/group/tiddlywiki.To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/68ce1ef5-18eb-4b9c-a155-9f92c82be91a%40googlegroups.com.For more options, visit https://groups.google.com/d/optout.

What you suggest returns the value of the array under char index "nov",which is - 30. Whereas I looked for a method for returning the number indexof the char index "nov", which is - 2, just because it is the secondelement of the array.

Any idea?

Post by BurningTreeC<$list filter="[[datatiddler]getindex[nov]]"> <<currentTiddler>> </$list>gives you "30" as resultyou can do it in different ways. look athttps://tiddlywiki.com/#getindex%20OperatorBurningTreeC

Post by oleghbondDear All,I've encountered an issue which I need to resolve, namely: How to get arecord index of a named property from a data tiddler?*{"oct":31,"nov":30,"dec":31}*As one can see the number index value of the named property, say,*"nov"* is 2.But how can I get this number index using a macros of a plugin?I feel that it should be somehow simply, but I've no idea how.I would be grateful for your help.Olegh

--You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.To post to this group, send email to ***@googlegroups.com.Visit this group at https://groups.google.com/group/tiddlywiki.To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/81bdfb4c-4f82-40fa-91d1-1a131c058298%40googlegroups.com.For more options, visit https://groups.google.com/d/optout.

--You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.To post to this group, send email to ***@googlegroups.com.Visit this group at https://groups.google.com/group/tiddlywiki.To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/80f8238d-0fec-4867-aaea-c9e2e55704ad%40googlegroups.com.For more options, visit https://groups.google.com/d/optout.

--You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.To post to this group, send email to ***@googlegroups.com.Visit this group at https://groups.google.com/group/tiddlywiki.To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/1fa7c0ed-8997-4e20-8a44-ba7765caa33e%40googlegroups.com.For more options, visit https://groups.google.com/d/optout.

instead of the 1 2 3 4 5.... I normally use a tiddler that holds allintegers from 1 to x in its list field and use the filter[list[integernumberstiddler]limit<length>]] variable="index"

--You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.To post to this group, send email to ***@googlegroups.com.Visit this group at https://groups.google.com/group/tiddlywiki.To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/817734e3-0158-4055-b579-cc48db854daf%40googlegroups.com.For more options, visit https://groups.google.com/d/optout.

--You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.To post to this group, send email to ***@googlegroups.com.Visit this group at https://groups.google.com/group/tiddlywiki.To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/e0de2822-76a8-4dfd-ae6b-7b5caab9f94d%40googlegroups.com.For more options, visit https://groups.google.com/d/optout.

... and I see I must add a reverse[] to the list: <$list filter="1 2 3 4 56 7 8 9 10 +[limit<length>reverse[]]" variable="index">

--You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.To post to this group, send email to ***@googlegroups.com.Visit this group at https://groups.google.com/group/tiddlywiki.To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/1884b144-0dd4-48ff-8a61-df41817128f9%40googlegroups.com.For more options, visit https://groups.google.com/d/optout.

If you're just dealing with the months of the year, then the other easypossibility is to make a second data tiddler:

*{"oct":1,"nov":2,"dec":3}*

-- Mark

Post by oleghbondDear All,I've encountered an issue which I need to resolve, namely: How to get arecord index of a named property from a data tiddler?*{"oct":31,"nov":30,"dec":31}*As one can see the number index value of the named property, say, *"nov"* is2.But how can I get this number index using a macros of a plugin?I feel that it should be somehow simply, but I've no idea how.I would be grateful for your help.Olegh

--You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.To post to this group, send email to ***@googlegroups.com.Visit this group at https://groups.google.com/group/tiddlywiki.To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/9fa7612d-6250-476b-aa65-0228edaa8a78%40googlegroups.com.For more options, visit https://groups.google.com/d/optout.