Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner

Basic findstr question

quangtran
Cirrus
Cirrus

Hello everyone, I have a request like this:

{

    "Data": "eyJVc2VyTmFtZSI6ImVjdXN0"

}

I want to get the data snippet: eyJVc2VyTmFtZSI6ImVjdXN0 , i use findstr code like this:

set data [findstr [HTTP::payload] "\"\Data\"\: 9 \"\ "]

log local0. "raw data = $data"

but return is empty data, 

What do I need to change here?

Any and all help is appreciated. Thanks you

 

1 ACCEPTED SOLUTION

mihaic
MVP
MVP

Here is the findstr document:

https://clouddocs.f5.com/api/irules/findstr.html

you probably need something like this:

set data [findstr [HTTP::payload] "Data"  9  \" ]

View solution in original post

3 REPLIES 3

mihaic
MVP
MVP

Here is the findstr document:

https://clouddocs.f5.com/api/irules/findstr.html

you probably need something like this:

set data [findstr [HTTP::payload] "Data"  9  \" ]

Brilliant, this is exactly what I needed. Many thanks!

Glad I could help! 😁