Now handles nested JSON objects