Substring of line in file

I am trying to get a substring of a line in a file.

I want just the number between the first set of quotes and nothing else. This number may be different lengths but is always a number

q: (unique value of (it as trimmed string) of following texts of first ":" of lines containing "attributes" of file  "D:\Installers\attributes.json")
A: "17783", "version": "1.0.0"}

My test file only has one line but files in the field may have other lines before or after this line.

image

Any help would be much appreciated.

We actually have JSON inspectors, that may be more straightforward if you care to post a larger sample. The basic method would be something like

values of keys "attributes" of values of keys "ParentKeyName" of jsons of files "c:\whatever.json"

Otherwise, with just the string inspectors, it should be something like

preceding texts of firsts "%22" of following texts of firsts "%22" of following texts of firsts "%22attributes%22:" of lines of files "c:\something.json"

( %22 is the hex-encoded string for doublequote, so we can specify that code to match on literal doublequotes )

1 Like

Logging off for the day but I will test it out tomorrow. I appreciate your help

Thank you, this worked perfectly

2 Likes