Editing nested data in dynamic form

I have a situation where my server returns data about a product, but this data has nested sub data.

This is an example of the data that is returned from the server:

{
    product_id: 101,
    name: "cd player"
    description: "bla bla bla",
    categories: [
        {category_id:1, category_name:"Audio"},
        {category_id:3, category_name:"CD"}
    ],
    price: 144.99,
    images: [
        { image_id:1, path:"/tmp/x.png" },
        { image_id:2, path:"/tmp/y.png" }
    ]
}

I want to be able to use a dynamic form to edit this data. Ideally the categories and images section of the data should be presented as ListGrids.

Can anyone tell me how I could achieve this?

(I am using smartclient 7 rc2)

See this sample. This pattern works regardless of whether you use Hibernate for persistence.

Thank you for your response, it worked perfectly.