fix matching lists with nested documents
cleanup unit tests by using JSON syntax