Re: Searching for the equivalent of coercing to type "record"
Re: Searching for the equivalent of coercing to type "record"
- Subject: Re: Searching for the equivalent of coercing to type "record"
- From: Emmanuel <email@hidden>
- Date: Fri, 7 Mar 2003 17:11:55 +0100
At 8:07 AM -0500 07/03/03, Steve Cunningham wrote:
I have a tab-seperated text file of the form:
"field_name_x" (tab) "field value" (tab) "field_name_y" (tab) "field
value" (return)
"field_name_x" (tab) "field value" (tab) "field_name_y" (tab) "field
value" (return)
... etc
I know the set of possible field names, but not which will appear in any
given record or in what sequence
What I'd like to end up with is an AppleScript record of the form:
{field_name_x: "field value",field_name_y: "field value"}
I think that you will be interested in the following snippet:
do script ("{<<class usrf>>:{\"a\", \"b\"}} as record")
--> {a:"b"}
(put chevrons where suitable)
Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.