support for nested objects
adequate test and readme to cover all possible scenarios
Merge pull request #1 from gtramontina/master

patch to make this work for nested objects