You are viewing limited content. For full access, please sign in.

Question

Question

Partial match or wildcard or reg ex expressions in JPATH

asked on July 5, 2019 Show version history

Hi Laserfiche,

I'd like to match using a wildcard and found some implementations of JPath use regex:

.nodes[?(@.value=~/string.*/i)]

Is there a way to do this with WF 10.4? If not, I'd like to make a request. It's not something I use very often but hopefully others would use it or it's easy to implement.

For now, I have to hope the source system will always store its data in an particular order.

 

0 0

Replies

replied on July 8, 2019

Technically you can use pattern matching on the raw JSON content because it is still text. I had a similar issue recently where the value I was looking for could be in different places.

I ended up just using pattern matching to grab everything between "field name":" and instead of trying to fight with JPath on dynamic content.

1 0
replied on July 8, 2019

JPath is nice and consistent, when it works though.  It would be great if the current support could be extended.

0 0
replied on July 8, 2019

I agree, just wanted to provide the workaround I've been using.

1 0
replied on July 9, 2019

It's always good to have options smiley

0 0
replied on August 16, 2019 Show version history

Hello

I am trying to teach myself JPath as I'll be using this extensively in the near future.

I can regex the heck out of my input but when trying to do anything with the JPath editor and what is provided, it doesn't return anything.

All I got working is $.. which sorts it in a neat way, but even when I copy the neatly sorted JSON, I cannot seem to get the JPath working.

The LF Administration guide doesn't really show you "How-to".

My input attached.

Some help would be great - just a doc or something please?

Thanks

P.S.

Thinking I should just use regex, but I dislike doing that because it is static, as soon as something changes then one must change all regex'd tokens...

You are not allowed to follow up in this post.

Sign in to reply to this post.