[Zope] Modifying form input which is passed as a record

Richard Ettema richard.ettema@yoursolutions.co.uk
Thu, 19 Apr 2001 12:24:11 +0100


Hi,

I have a form that passes info as a record with the following type of info:

[a: 'bob', b: 'silver', a: 'trev', b: 'gold', a: 'nig', b: 'bronze',
a:'lee', b:'gold']

I want to work thru this info and pick out all the records with a key 'b'
equal to 'gold'. I want to place this into a new key-value record (or list?)
to use later. So it would create:

[a: 'trev', b: 'gold', a:'lee', b:'gold']

I cant work out how to do this. My main problem is inserting key names to
make the key-value pairs.

I have got around this by creating a list within a list but this has no
keys:

[ ['trev','gold'], ['lee','gold'] ]

Thanks for any ideas.

Richard