Added arrays as objects code snippet.