I received an array from an API that appears to contain, for lack of a better phrase, object-style notation.
Since it is an array, I cannot obviously access it by a key or value. I don't see a method in this particular object type that allows me to convert it to a hash, or JSON and then to a hash.
What is the most appropriate way of converting this to a hash where I can access the data by key and value?
Output:
[#<ObjectType::ObjectRef:0x30f2862
@_ref="record:full/data/location/setting/partition",
@configured=false,
@name="John Doe",
@addr="10.10.10.10">]
Alternatively, if this can be converted to an array with multiple elements (instead of one big chunked together element), I could parse it to CSV and filter outside of Ruby. The elements in the new array would contain the "values" (e.g. false, "John Doe", "10.10.10.10).
Try this: