added function to extract documents form insert commands.

used by server-client-cli to generate schemas for insert commands.