Accessing $oid in JSON

I have a schema

[{
“id”: {
“$oid”: “589ccc5dfc13ae0a260003e8”
},

}]

I would like to be able to access the value of the MongoDB ObjectId field, $oid, but everything I try gives me a syntax error:

"Syntax error in formula 'id.$oid'"

Is it possible to access this value? I’ve even tried escaping the $ but that didn’t do it.

Looks like just calling to_s works:

hmm, whatdaya know. I was trying all sorts of complicated ways and a simple to_s did the trick. Thanks!!!