pseudo algo for nested
nested json api for single recored working