How to get values from JSON file using AppleScript?

162 viewsapplescriptjsonmacosapplescript json macos

In reference to this question,

How to download and get values from JSON file using VBScript or batch file?

how to get the values from JSON file that looks like this,


using AppleScript in MAC OS?

Here is part of VBScript code in Windows provided by Hackoo,

strJson = http.responseText
Result = Extract(strJson,"(x22(.*)x22)")
Arr = Split(Result,",")
For each Item in Arr
    wscript.echo Item
Function Extract(Data,Pattern)
   Dim oRE,oMatches,Match,Line
   set oRE = New RegExp
   oRE.IgnoreCase = True
   oRE.Global = True
   oRE.Pattern = Pattern
   set oMatches = oRE.Execute(Data)
   If not isEmpty(oMatches) then
       For Each Match in oMatches  
           Line = Line & Trim(Match.Value) & vbCrlf
       Extract = Line
   End if
End Function

In MAC OS AppleScript I only need the code to get the values of the JSON file to a single array of string values. The above shown example above the VBScript is the how JSON file contents looks like.