Jump to content

Recommended Posts

Posted (edited)

 

  On 1/25/2021 at 7:31 PM, gcue said:

eureka!  thanks for the clue on ID not being a generic ID... i tried this and got values!

$sApp = Json_Get($oJson, "[" & $i & "][Overview.Name]")

    If @error Then ExitLoop

    $sCollab = Json_Get($oJson, "[" & $i & "][ReviewableSystems.IsCollaborationRecorded]")

    if StringInStr($sCollab, "Yes") <> 0 Then
        ConsoleWrite("App: " & $sApp & @CRLF)
        ConsoleWrite("Collab: " & $sCollab & @CRLF & @CRLF)
    EndIf

sorry again for the mix-up

Expand  

If I were going to use jq to do what your example does, which is list all Overview.Name where ReviewableSystems.IsCollaborationRecorded = "Yes", then assuming the JSON below I would do something like:  (I added a couple of extra fields in the result, type & location, to show how easy it is to show additional fields in the process)

You could get a similar result using a SQLite query against the JSON data.

 

Assuming the following JSON file:

  Reveal hidden contents

Example jq Script:

  Reveal hidden contents

 

Edited by TheXman
Posted (edited)

You're welcome!  👍  Hopefully, the example will open your eyes to other ways to process JSON data.

Edited by TheXman

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...