Getting info from records

I have written a script using SOAP to get info from Amazon Web Services. Unfortunately, I can’t figure out how to extract the data from the resulting record. The script is

using terms from application "http://www.apple.com"
	tell application ("http://soap.amazon.com/onca/soap" as string)
		set soapresult to call soap {method name:"KeywordSearchRequest", method namespace uri:"urn:PI/DevCentral/SoapService", parameters:{|KeywordSearchRequest|:{keyword:"dog", mode:"dvd", tag:"webservices-20", devTag:"DU7TKVGV6U805", page:1, type:"heavy"}}, SOAPAction:"urn:PI/DevCentral/SoapService"}
	end tell
end using terms from

The SOAP result comes in the form of a record
{|Details|:{{|Catalog|:“DVD”,|Sales Rank|: etc
I know how to get to the first level by using "set x to |Details| of ". What I don’t know is how to get info out of the part starting with “{{”. Thanks. :?: :?

It looks like the value of the |Details| field is a list of records (maybe only a list of one record, but still a list of record). In that case, there may be multiple |Details| records you need to handle. To get the first Details record, you’d ask for:

set oneDetailRecord to item 1 of |Details| of soapResult

Now, if there ARE multiple Details records, you’ll need to do something like:


repeat with oneDetailRecord in |Details| of soapResult
  -- Do something with oneDetailRecord
end repeat

Make sense?