Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
π« Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
Print Arrays, Hashes etc in a readable format?
-
Is there a way to output an Array, Hash etc in the Console in a more readable way?
So that items are listed on each their line and indents as the object nests? -
myarray.sort.join("\n") from the console works great.
For hashes, take your pick of .each, each_key, each_pair, and so on.
Read up on the Enumerable class.
-
Ok. I was just checking that there wasn't a built-in function that printed objects, like what you get in PHP with print_r.
Advertisement