set pStart to offset of "{" in errText
set structure to text pStart thru ((length of errText) - 2) of errText
set TIDL to AppleScript's text item delimiters
set AppleScript's text item delimiters to ","
set fields to text items of structure as list
set keys to {}